Birthday Gift

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

It’s your Venusian friend’s birthday. You don’t remember their exact age, but you are sure it had to be no more than 101810^{18} years. You will give them a decimal number (without leading zeros) for their birthday. You want the number of digits to be equal to their age. To make the number more interesting you will ensure that no adjacent pairs of digits will be identical.

Their exact day of birth is represented as an integer in the range 00 to 224224 (since Venus has 225225 days in a year). To make their gift more personal you want the given number to have the same remainder as their birthday when divided by 225225.

There are potentially a lot of possible gifts that you could give. You may decide to give more than one gift. Determine the number of possible gifts modulo 109+710^9+7.

입력

The single line of input contains two space separated integers aa (1a10181 \le a \le 10^{18}) and bb (0b<2250 \le b < 225), where aa is the age of your friend and bb is the birthdate of your friend.

출력

Output a single integer, which is the number of interesting personalized numbers you could give. Since this number may be quite large, output it modulo 109+710^9+7.