#CCBCMCHIN0000008. Chia hết cho 3 và 5 (Divisible by 3 and 5)
Chia hết cho 3 và 5 (Divisible by 3 and 5)
Divisible by 3 and 5
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given an integer , determine whether it is divisible by both and .
Input
A single line contains the integer .
Output
Print YES if is divisible by both and ; otherwise print NO.
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Examples
Example 1
Input
30
Output
YES
Explanation
For n = 30, the remainders modulo 3 and 5 are 0 and 0. Both must be zero, so the required output is YES.
Example 2
Input
9
Output
NO
Explanation
For n = 9, the remainders modulo 3 and 5 are 0 and 4. Both must be zero, so the required output is NO.
Example 3
Input
0
Output
YES
Explanation
For n = 0, the remainders modulo 3 and 5 are 0 and 0. Both must be zero, so the required output is YES.