Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.

Petya calls a number almost lucky if it could be evenly divided by some lucky number. Help him find out if the given number *n* is almost lucky.
The single line contains an integer *n* (1 ≤ *n* ≤ 1000) — the number that needs to be checked.
47
YES
16
YES
78
NO
48
YES
100
YES
107
NO
77
YES
477
YES
480
YES
1
NO
3
NO
4
YES
49
YES
56
YES
124
YES
1000
YES
999
NO
298
NO
274
NO
998
NO
42
YES
788
YES
70
YES
444
YES
777
YES
799
YES
25
NO
882
YES
88
YES
11
NO
2
NO
7
YES
8
YES
94
YES
477
YES
141
YES
n=int(input())
l=[int(digit) for digit in str(n)]

if all(digits==4 or digits==7 for digits in l):
    print("YES")
elif n%4==0 or n%7==0:
    print("YES")
else:    
    print("NO")