Counting Amusing Numbers#6439

Counting Amusing Numbers

1 second
256 megabytes
Medium

Do you think that counting is easy? This is not the case when you don't fully understand objects that you are counting.

Let's call a -digit integer (possibly with leading zeroes) amusing if two -digit integers and (again, possibly with leading zeroes) exist such that a + b = 10^N and S_d(X) = S_d(a) + S_d(b) holds for every digit , where S_d(P) (0 \leq d \leq 9) is the number of occurrences of digit in the decimal representation of . For example, numbers (4 + 6 = 10^1), (98 + 02 = 10^2) and (6020 + 3980 = 10^4) are amusing.

You are given a sequence of digits and question marks of an even length. Find the number of ways to replace question marks with digits to get an amusing number, modulo 10^9 + 7.

Input

The only line contains a non-empty sequence of digits and question marks. The length of the sequence is even and doesn't exceed 10^5. The number of question marks doesn't exceed .

Output

Print the sought number of ways modulo 10^9 + 7.

Examples

Example 1

Loading
Loading