import java.util.Scanner;

class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();

        int[] a = new int[100];

        for (int i = 0; i<N; i++){
            a[i] = stdIn.nextInt();
        }
        
        int flag = 0;
        int j;
        for (j=0; j<N; j++){
            if (a[j]%2 == 0) {
                if (a[j]%3 != 0 && a[j]%5 != 0){
                    flag = 1;
                    break;
                }
            }
        }

        if (flag == 1)
            System.out.println("DENIED");
        else
            System.out.println("APPROVED");
        
        //System.out.println("j = "+j);
        

    }
} import java.util.Scanner; Scanner java.util class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();

        int[] a = new int[100];

        for (int i = 0; i<N; i++){
            a[i] = stdIn.nextInt();
        }
        
        int flag = 0;
        int j;
        for (j=0; j<N; j++){
            if (a[j]%2 == 0) {
                if (a[j]%3 != 0 && a[j]%5 != 0){
                    flag = 1;
                    break;
                }
            }
        }

        if (flag == 1)
            System.out.println("DENIED");
        else
            System.out.println("APPROVED");
        
        //System.out.println("j = "+j);
        

    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();

        int[] a = new int[100];

        for (int i = 0; i<N; i++){
            a[i] = stdIn.nextInt();
        }
        
        int flag = 0;
        int j;
        for (j=0; j<N; j++){
            if (a[j]%2 == 0) {
                if (a[j]%3 != 0 && a[j]%5 != 0){
                    flag = 1;
                    break;
                }
            }
        }

        if (flag == 1)
            System.out.println("DENIED");
        else
            System.out.println("APPROVED");
        
        //System.out.println("j = "+j);
        

    } main {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();

        int[] a = new int[100];

        for (int i = 0; i<N; i++){
            a[i] = stdIn.nextInt();
        }
        
        int flag = 0;
        int j;
        for (j=0; j<N; j++){
            if (a[j]%2 == 0) {
                if (a[j]%3 != 0 && a[j]%5 != 0){
                    flag = 1;
                    break;
                }
            }
        }

        if (flag == 1)
            System.out.println("DENIED");
        else
            System.out.println("APPROVED");
        
        //System.out.println("j = "+j);
        

    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int N = stdIn.nextInt(); N stdIn.nextInt() stdIn.nextInt stdIn int[] a = new int[100]; a new int[100] 100 for (int i = 0; i<N; i++){
            a[i] = stdIn.nextInt();
        } int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
            a[i] = stdIn.nextInt();
        } {
            a[i] = stdIn.nextInt();
        } a[i] = stdIn.nextInt() a[i] a i stdIn.nextInt() stdIn.nextInt stdIn int flag = 0; flag 0 int j; j for (j=0; j<N; j++){
            if (a[j]%2 == 0) {
                if (a[j]%3 != 0 && a[j]%5 != 0){
                    flag = 1;
                    break;
                }
            }
        } j=0; j=0 j 0 j<N j N j++ j++ j {
            if (a[j]%2 == 0) {
                if (a[j]%3 != 0 && a[j]%5 != 0){
                    flag = 1;
                    break;
                }
            }
        } {
            if (a[j]%2 == 0) {
                if (a[j]%3 != 0 && a[j]%5 != 0){
                    flag = 1;
                    break;
                }
            }
        } if (a[j]%2 == 0) {
                if (a[j]%3 != 0 && a[j]%5 != 0){
                    flag = 1;
                    break;
                }
            } a[j]%2 == 0 a[j]%2 a[j] a j 2 0 {
                if (a[j]%3 != 0 && a[j]%5 != 0){
                    flag = 1;
                    break;
                }
            } if (a[j]%3 != 0 && a[j]%5 != 0){
                    flag = 1;
                    break;
                } a[j]%3 != 0 && a[j]%5 != 0 a[j]%3 != 0 a[j]%3 a[j] a j 3 0 a[j]%5 != 0 a[j]%5 a[j] a j 5 0 {
                    flag = 1;
                    break;
                } flag = 1 flag 1 break; if (flag == 1)
            System.out.println("DENIED");
        else
            System.out.println("APPROVED"); flag == 1 flag 1 System.out.println("DENIED") System.out.println System.out System System.out "DENIED" System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" String[] args args
import java.util.Scanner;

class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();

        int[] a = new int[100];

        for (int i = 0; i<N; i++){
            a[i] = stdIn.nextInt();
        }
        
        int flag = 0;
        int j;
        for (j=0; j<N; j++){
            if (a[j]%2 == 0) {
                if (a[j]%3 != 0 && a[j]%5 != 0){
                    flag = 1;
                    break;
                }
            }
        }

        if (flag == 1)
            System.out.println("DENIED");
        else
            System.out.println("APPROVED");
        
        //System.out.println("j = "+j);
        

    }
}