LogiQuest

496. Self-Dividing Numbers

EasyMath

A self-dividing number is divisible by each of its digits and contains no zero. Print all such numbers in [left, right], or NONE.

Input format

One line: left right

Output format

The numbers or NONE.

Example 1

Input

1 22

Output

1 2 3 4 5 6 7 8 9 11 12 15 22

Example 2

Input

47 85

Output

48 55 66 77

Constraints

1 ≤ left ≤ right ≤ 10⁴

Read input from standard input and print the answer to standard output. Your code is judged against 4 test cases, most of them hidden.

Loading the MyLoginn IDE…