#include <stdio.h>
#include <math.h>

int main(){
  int n;
  int i;
   while(scanf("%d",&n)!=EOF){
      double m = (int)sqrt(n);
      int s = 0;

      for(i=1;i<=m;i++){
        if(n%i==0){
          s += i ;
          //printf("s1 =  %d\n",s);
          s += (n/i);
          //printf("s2 =  %d\n",s);
        }
      }


       if(n==m*m){s-=m;}

        s -= n;
        //printf("s4 =  %d\n",s);

      if(n==0)s=1;
    //printf("s =  %d\n",s);
      if(s<n){printf("deficient number\n");}
      else if(s==n){printf("perfect number\n");}
      else{printf("abundant number\n");}
   }
   return 0;
}