Submit | All submissions | Best solutions | Back to list |
EIINT21222MQ3 - SPECICAL NUMBER |
A special number is a natural number with at least 3 digits that is divisible by the number formed by its first and last digits. Given an integer N (0 ≤ N≤1018), check if N is a special number or not?
Input
a positive integer N
Output
YES if N is a special number, NO otherwise
Example
Input: 108 Output: YES Input: 111 Output: NO