import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        int A[] = new int[N];
        for(int i=0; i<N; i++){
            A[i] = scn.nextInt();
        }
        
        Boolean ok = true;
        for(int x:A){
            if(x%2==0){
                if(x%3!=0&&x%5!=0) ok = false; 
            }
        }
        
        System.out.println(ok?"APPROVED":"DENIED");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        int A[] = new int[N];
        for(int i=0; i<N; i++){
            A[i] = scn.nextInt();
        }
        
        Boolean ok = true;
        for(int x:A){
            if(x%2==0){
                if(x%3!=0&&x%5!=0) ok = false; 
            }
        }
        
        System.out.println(ok?"APPROVED":"DENIED");
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        int A[] = new int[N];
        for(int i=0; i<N; i++){
            A[i] = scn.nextInt();
        }
        
        Boolean ok = true;
        for(int x:A){
            if(x%2==0){
                if(x%3!=0&&x%5!=0) ok = false; 
            }
        }
        
        System.out.println(ok?"APPROVED":"DENIED");
    } main {
        
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        int A[] = new int[N];
        for(int i=0; i<N; i++){
            A[i] = scn.nextInt();
        }
        
        Boolean ok = true;
        for(int x:A){
            if(x%2==0){
                if(x%3!=0&&x%5!=0) ok = false; 
            }
        }
        
        System.out.println(ok?"APPROVED":"DENIED");
    } Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int N = scn.nextInt(); N scn.nextInt() scn.nextInt scn int A[] = new int[N]; A new int[N] N for(int i=0; i<N; i++){
            A[i] = scn.nextInt();
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            A[i] = scn.nextInt();
        } {
            A[i] = scn.nextInt();
        } A[i] = scn.nextInt() A[i] A i scn.nextInt() scn.nextInt scn Boolean ok = true; ok true for(int x:A){
            if(x%2==0){
                if(x%3!=0&&x%5!=0) ok = false; 
            }
        } int x A {
            if(x%2==0){
                if(x%3!=0&&x%5!=0) ok = false; 
            }
        } {
            if(x%2==0){
                if(x%3!=0&&x%5!=0) ok = false; 
            }
        } if(x%2==0){
                if(x%3!=0&&x%5!=0) ok = false; 
            } x%2==0 x%2 x 2 0 {
                if(x%3!=0&&x%5!=0) ok = false; 
            } if(x%3!=0&&x%5!=0) ok = false; x%3!=0&&x%5!=0 x%3!=0 x%3 x 3 0 x%5!=0 x%5 x 5 0 ok = false ok false System.out.println(ok?"APPROVED":"DENIED") System.out.println System.out System System.out ok?"APPROVED":"DENIED" ok "APPROVED" "DENIED" String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        int A[] = new int[N];
        for(int i=0; i<N; i++){
            A[i] = scn.nextInt();
        }
        
        Boolean ok = true;
        for(int x:A){
            if(x%2==0){
                if(x%3!=0&&x%5!=0) ok = false; 
            }
        }
        
        System.out.println(ok?"APPROVED":"DENIED");
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        int A[] = new int[N];
        for(int i=0; i<N; i++){
            A[i] = scn.nextInt();
        }
        
        Boolean ok = true;
        for(int x:A){
            if(x%2==0){
                if(x%3!=0&&x%5!=0) ok = false; 
            }
        }
        
        System.out.println(ok?"APPROVED":"DENIED");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scn = new Scanner(System.in);
        int N = scn.nextInt();
        int A[] = new int[N];
        for(int i=0; i<N; i++){
            A[i] = scn.nextInt();
        }
        
        Boolean ok = true;
        for(int x:A){
            if(x%2==0){
                if(x%3!=0&&x%5!=0) ok = false; 
            }
        }
        
        System.out.println(ok?"APPROVED":"DENIED");
    }
}
