Sunyoung believes that if a room number contains the same digit two or more times, misfortune will befall whoever stays in that room. So she will never use a number in which a digit repeats, such as 838 or 1004.
In 2050, Sunyoung has become the wealthiest person in Korea, and she plans to build a new hotel by the sea. To keep misfortune away from her guests, every room number must have no repeated digit.
The government granted the construction permit on the condition that each room number is at least $N$ and at most $M$. Two different rooms cannot share the same number. What is the largest number of rooms the hotel can have? In other words, count the integers between $N$ and $M$ (inclusive) that contain no repeated digit.
The input consists of several test cases. Each test case is given on one line as two integers $N$ and $M$ separated by a space. ($1 \le N \le M \le 5000$) The input continues until the end of file.
For each test case, print on its own line the number of integers between $N$ and $M$ (inclusive) whose digits are all distinct (no digit repeats).