~/algor $ cat problems/mukammal-sonmi
Perfect number?
Easy
1000 ms
64 MB
23%
A positive integer $n$ is given. A number is called perfect if it equals the sum of all its positive divisors smaller than itself (for example, $6 = 1 + 2 + 3$). Print YES if $n$ is a perfect number, otherwise NO.
Input
One positive integer $n$.
Output
YES or NO.
Note
$1 \le n \le 10^{6}$
Examples
Input #1
28
Output #1
YES
Input #2
12
Output #2
NO