eolymp
bolt
Try our new interface for solving problems
Problems

Divisibility by digits

Divisibility by digits

Four-digit number is given. Determine whether it is divisible by each of its digits. \InputFile One four-digit number. \OutputFile Print "\textbf{YES}" if the number is divisible by each of its digits, and "\textbf{NO}" otherwise.
Time limit 1 second
Memory limit 128 MiB
Input example #1
2244
Output example #1
YES
Input example #2
2344
Output example #2
NO