#SCCCIE000012. Ba thẻ RGB (RGB Cards)
Ba thẻ RGB (RGB Cards)
RGB Cards
Source: AtCoder
Problem Statement
Three cards contain digits , , and . Concatenate them in that order into a three-digit integer and determine whether it is divisible by .
Input
One line contains , , and .
Output
Print YES if the concatenated number is divisible by ; otherwise print NO.
Subtasks
- Subtask 1 (100%):
Examples
Example 1
Input
4 3 2
Output
YES
Explanation
For the sample values 4, 3, 2, evaluating the conditions in the statement gives YES. Therefore the program prints the shown output.
Example 2
Input
2 3 4
Output
NO
Explanation
For the sample values 2, 3, 4, evaluating the conditions in the statement gives NO. Therefore the program prints the shown output.