131. Perfect Number
EasyDivisors
A perfect number equals the sum of its proper divisors (6 = 1 + 2 + 3). Print YES or NO.
Input format
A single integer n.
Output format
YES or NO
Example 1
Input
6
Output
YES
Example 2
Input
28
Output
YES
Constraints
1 ≤ n ≤ 10¹²
Read input from standard input and print the answer to standard output. Your code is judged against 6 test cases, most of them hidden.
Loading the MyLoginn IDE…