#include<stdio.h>
int main(){
   int n,i,j,k,count=0;
   scanf("%d",&n);
   int a[n];
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  for(j=0;j<n;j++){
    if(a[j]%2==0){
       if(a[j]%3==0 || a[j]%5==0){
         count++;
       }
      
    }
    else if(a[j]%2!=0){
         count++;
    }
  }
  if(count==n)
    printf("APPROVED");
  else
    printf("DENIED");
  return 0;
}

    


          
   
   
   
   