Divisibility by digits
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Four-digit number is given. Determine whether it is divisible by each of its digits.
Input
One four-digit number.
Output
Print "YES" if the number is divisible by each of its digits, and "NO" otherwise.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 23K
Acceptance rate 24%