#CCBOTPBA0000043. Lucky Division
Lucky Division
Lucky Division
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
A lucky number contains only decimal digits 4 and 7. Determine whether n is divisible by at least one lucky number; n itself need not be lucky.
Input
One integer n.
Output
Print YES or NO.
Subtasks
-
Subtask 1 (20%):
n ≤ 100. -
Subtask 2 (30%):
n ≤ 500. -
Subtask 3 (50%):
n ≤ 1000.
Examples
Example 1
Input:
47
Output:
YES
Explanation: 47 itself is lucky.
Example 2
Input:
16
Output:
YES
Explanation: Sixteen is divisible by the lucky number four.
Example 3
Input:
78
Output:
NO
Explanation: Seventy-eight has no lucky divisor.