// Arup Guha
// 10/28/2017
// Solution to Junior Knights Loop Practice Program: Perfect, Abundant, Deficient Numbers

import java.util.*;

public class numbers {
	
	public static void main(String[] args) {
		
		// Get the parameters of the sequence.
		Scanner stdin = new Scanner(System.in);
		System.out.println("Enter a positive integer n > 1.");
		int n = stdin.nextInt();
		
		// Initialize accumulator.
		int total = 0;
		
		// Go through all possible proper divisors.
		for (int i=1; i<=n/2; i++)
			
			// Found one, so add it.
			if (n%i == 0)
				total += i;
		
		// Print result.		
		System.out.println("The sum of the proper divisors of "+n+" is "+total+".");
		
		// Print type of number.
		if (total < n)
			System.out.println(n+" is a deficient number.");
		else if (total == n)
			System.out.println(n+" is a perfect number.");
		else
			System.out.println(n+" is an abundant number.");
	}
}