Digit Translation
시간 제한1초메모리 제한2048 MB
영어로 적힌 숫자 단어(zero부터 nine까지)를 해당 숫자로 바꾸는 연산을 반복해 얻을 수 있는 가장 짧은 문자열의 길이와, 그 길이를 갖는 서로 다른 문자열의 개수를 구한다.
문제
You are given a string of lowercase letters. In one operation, if you can find a substring that is one of the written-out forms of one of the digits from zero to nine ("zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"), you can replace that substring with the numeric digit.
Your goal is to find the shortest possible string you can end up with after applying zero or more of these operations, as well as how many distinct strings of that length there are.
입력
The single line of input contains a string of lowercase letters with length at least one and at most .
출력
Output two separate lines.
On the first line output a single integer, which is the length of the shortest possible string.
On the second line output a single integer, which is the number of distinct strings of that length that can be obtained after applying zero or more of the specified operations, modulo 9302023.