Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.

book
Almost Lucky Number

Alex loves lucky numbers. Lucky numbers are positive integers that contain only the digits 4 and 7 in their decimal representation.

For example, numbers like 47, 744, and 4 are lucky, while numbers like 5, 17, and 467 are not.

Alex 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, return YES if its almost lucky and NO in the opposite case.

Example 1

Input:

47

Output:

YES

Example 2

Input:

16

Output:

YES

Example 3

Input:

78

Output:

NO
main.cpp

main.cpp

C++

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

some-alt