#include<stdio.h>

int main(void){
        int N,a[100],i,j=0,k=0;
        scanf("%d",&N);

        for(i=0;i<N;i++)
           scanf("%d",&a[i]);
        for(i=0;i<N;i++){
           if(a[i]%2==0){
             j++;
           if((a[i]%3==0)||(a[i]%5==0))
             k++;
           }
        }

        if(j==k) printf("APPROVED\n");
        else     printf("DENIED\n");

        return 0;
}
