Patterns
The pattern of size n is called a string of length n, each of the characters which belong to the set {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f, g, ?}. Templates are converted into strings of digits the following rules:
characters 0 to 9 can be converted only to themselves;
symbol а can be converted to any of the symbols 0, 1, 2, 3;
symbol b can be converted to any of the symbols 1, 2, 3, 4;
symbol с can be converted to any of the symbols 2, 3, 4, 5;
symbol d can be converted to any of the symbols 3, 4, 5, 6;
symbol е can be converted to any of the symbols 4, 5, 6, 7;
symbol f can be converted to any of the symbols 5, 6, 7, 8;
symbol g can be converted to any of the symbols 6, 7, 8, 9;
symbol ? can be converted to any of the symbols from 0 to 9.
Given two patterns: p_1 and p_2. Consider the set of S_1 lines that can be derived from p_1 by the rules outlined, and plenty of S2 lines that can be derived from p_2. Need to find a number of lines included in both sets.
Input
The first line contains the pattern p_1, the second - a pattern p_2. Patterns have the same positive amount, not exceeding 9.
Output
In the output file output response to the problem.