11159 - Aliquot sum   

Description

In mathematics, the aliquot sum s(n) of a positive integer n is the sum of all positive proper divisors of n. A positive proper divisor is a positive divisor of a number n, excluding n itself. The aliquot sums of perfect, deficient, and abundant numbers are equal to, less than, and greater than the number itself respectively.

 

If s(n) > n, then n is an abundant number.

If s(n) < n, then n is a deficient number.

If s(n) = n, then n is a perfect number.

 

Given a positive integer n, please calculate the aliquot sum and find out which kind of number is it.

 

For example, the proper divisors of 15 (that is, the positive divisors of 15 that are not equal to 15) are 1, 3 and 5, so the aliquot sum of 15 is 9 (1 + 3 + 5), and 15 will be a deficient number.

Input

A positive integer n.

Output

If n is an abundant number, output A.

If n is a deficient number, output D.

If n is a perfect number, output P.

Sample Input  Download

Sample Output  Download

Tags




Discuss