LearnPy Hub
← Arena
EasyRating 1000

Strong Number

A strong number equals the sum of the factorials of its digits (like 145 = 1! + 4! + 5!). Print YES or NO.

Input

One integer n (1 ≤ n ≤ 10⁹).

Output

YES or NO.

Sample 1

Input
145
Output
YES

Sample 2

Input
1
Output
YES
solution.py
Output appears here
Strong Number · Python Arena problem · LearnPy Hub