P10993 [MX-J3-T0] 37

Background

Original link: 。

Description

Input a natural number $a$, and determine whether all digits of $37\times a$ are equal.

Input Format

The input contains one line with one natural number $a$.

Output Format

If all digits of $37a$ are equal, output `Yes`; otherwise output `No`.

Explanation/Hint

**Sample Explanation #1** $37\times 6 = 222$, and its three digits are all $2$, which meets the requirement. **Sample Explanation #2** $37\times 33 = 1221$, and some digits are not equal (for example, the thousands digit and the hundreds digit), so it does not meet the requirement. **Constraints** This problem has $20$ test points, $5$ points each. It is guaranteed that $0\le a \le 3737$. Translated by ChatGPT 5