#include <stdio.h>

int main(){
	int n,sum;
	
	while(scanf("%d", &n) != 0){
		sum = 0;
		for(int i = 1; i < n; i++){
			if(n % i == 0){
				sum += i;
			}
		}
		if(sum > n) printf("abundant number\n");
		else if(sum < n) printf("deficient number\n");
		else printf("perfect number\n");
	}
	return 0;	
}