LearnPy Hub
← Loops problems
Medium

Armstrong Number

An Armstrong number equals the sum of its digits each raised to the number of digits (153 = 1³ + 5³ + 3³). Read n and print Yes or No.

Input

One integer.

Output

Yes or No.

Sample 1

Input
153
Output
Yes

Sample 2

Input
370
Output
Yes
solution.py
Output appears here
Armstrong Number · Python practice problem · LearnPy Hub