Peter wants to get a tatto.
However, he wants a fancy one instead of just a meaningless figure.
So, he dicides to choose a fancy number to be his new tatto.
The rule of determine a fancy number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. A divisor of an integer x
is an integer that can divide x
evenly.
For example, 6 is a fancy number(1 + 2 + 3 = 6), 28 is also a fancy number(1 + 2 + 4 + 7 + 14 = 28), and 7 is not a fancy number.
Given a sequence of number, please help him find out whether it is fancy or not.
Hint: If you got a TLE in the last two testcases, please think about the number of iterations.
A sequence of integers separated by a '\n'.
The input terminates until reading in EOF.
Each integer n is guranted that:
1 <= n <= 1e8
For each number, if it is a fancy number, print "True".
If not, print "False".
You need to print a newline character at the end of each line. ('\n')