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

book
Is It a Lucky Number?

Alex loves lucky numbers. Help him find out if the given number n is lucky, return YES if its lucky and NO in the opposite case. 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.

Example 1

Input:

47

Output:

YES

Example 2

Input:

5

Output:

NO
main.cpp

main.cpp

C++

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

some-alt