#include<stdio.h>
#include<stdlib.h>
int s[100000001];
int sort(void){
  int i,j;
  for(i=0;i<=100000000;i++){
    s[i]=0;
  }
  for(i=1;i<=50000000;i++){
    for(j=2;j*i<=100000000;j++){
      s[j*i]=s[j*i]+i;
    }
  }
}
      
int main(void){
  int n;
  sort();
  while(scanf("%d",&n)){
    if(n==0) exit(-1);
    if(n==1) {
      printf("deficient number\n");
      continue;
    }
    if(s[n]==n){
      printf("perfect number\n");
    }else if(s[n]<n){
      printf("deficient number\n");
    }else{
      printf("abundant number\n");
    }
    
  }
  return 0;
}