Лимит времени 1000/1000/1000/1000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Problem description
A perfect number is a natural number and when
you add up all of the factors less than that number, you get that number. The
first two perfect numbers are 6 and 28. 1+2+3 = 6, and 1+2+4+7+14 = 28.
Make a program that finds out if the given number is perfect or not.
Input
There is a single integer N on the first line (0 < N < 1012).
Output
Write "Yes" if N is perfect and "No" otherwise.
Example
Для отправки решений необходимо выполнить вход.
|