import java.util.*;

public class Main{

    static int mod = (int) 1e9 + 7;
    static int dx[] = {-1, 0, 1, 0}, dy[] = {0, -1, 0, 1};
    static int INF = Integer.MAX_VALUE/2;

    public static void main(String args[]){

        Scanner scan = new Scanner(System.in);

        //Queue<int[]> q = new ArrayDeque<int[]>();
        Integer N = new Integer(scan.nextInt());
        ArrayList<Integer> a = new ArrayList<Integer>();

        for(int i=0;i<N;i++) a.add(scan.nextInt());

        boolean flag = true;
        for(int i=0;i<N;i++){
            int t = a.get(i);
            if(t%2==0){
                if(!((t%3==0)||(t%5==0))) flag = false;
            }
        }

        if(flag)
            System.out.println("APPROVED");
        else
        System.out.println("DENIED");
    }

    static int factorial(int n){
        if(n == 0){
          return 1;
        }
        return n * factorial(n-1);
    }


} import java.util.*; util.* java public class Main{

    static int mod = (int) 1e9 + 7;
    static int dx[] = {-1, 0, 1, 0}, dy[] = {0, -1, 0, 1};
    static int INF = Integer.MAX_VALUE/2;

    public static void main(String args[]){

        Scanner scan = new Scanner(System.in);

        //Queue<int[]> q = new ArrayDeque<int[]>();
        Integer N = new Integer(scan.nextInt());
        ArrayList<Integer> a = new ArrayList<Integer>();

        for(int i=0;i<N;i++) a.add(scan.nextInt());

        boolean flag = true;
        for(int i=0;i<N;i++){
            int t = a.get(i);
            if(t%2==0){
                if(!((t%3==0)||(t%5==0))) flag = false;
            }
        }

        if(flag)
            System.out.println("APPROVED");
        else
        System.out.println("DENIED");
    }

    static int factorial(int n){
        if(n == 0){
          return 1;
        }
        return n * factorial(n-1);
    }


} Main static int mod = (int) 1e9 + 7; mod (int) 1e9 + 7 (int) 1e9 7 static int dx[] = {-1, 0, 1, 0} dx {-1, 0, 1, 0} -1 1 0 1 0 dy[] = {0, -1, 0, 1}; dy {0, -1, 0, 1} 0 -1 1 0 1 static int INF = Integer.MAX_VALUE/2; INF Integer.MAX_VALUE/2 Integer.MAX_VALUE Integer Integer.MAX_VALUE 2 public static void main(String args[]){

        Scanner scan = new Scanner(System.in);

        //Queue<int[]> q = new ArrayDeque<int[]>();
        Integer N = new Integer(scan.nextInt());
        ArrayList<Integer> a = new ArrayList<Integer>();

        for(int i=0;i<N;i++) a.add(scan.nextInt());

        boolean flag = true;
        for(int i=0;i<N;i++){
            int t = a.get(i);
            if(t%2==0){
                if(!((t%3==0)||(t%5==0))) flag = false;
            }
        }

        if(flag)
            System.out.println("APPROVED");
        else
        System.out.println("DENIED");
    } main {

        Scanner scan = new Scanner(System.in);

        //Queue<int[]> q = new ArrayDeque<int[]>();
        Integer N = new Integer(scan.nextInt());
        ArrayList<Integer> a = new ArrayList<Integer>();

        for(int i=0;i<N;i++) a.add(scan.nextInt());

        boolean flag = true;
        for(int i=0;i<N;i++){
            int t = a.get(i);
            if(t%2==0){
                if(!((t%3==0)||(t%5==0))) flag = false;
            }
        }

        if(flag)
            System.out.println("APPROVED");
        else
        System.out.println("DENIED");
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) Integer N = new Integer(scan.nextInt()); N new Integer(scan.nextInt()) ArrayList<Integer> a = new ArrayList<Integer>(); a new ArrayList<Integer>() for(int i=0;i<N;i++) a.add(scan.nextInt()); int i=0; int i=0; i 0 i<N i N i++ i++ i a.add(scan.nextInt()); a.add(scan.nextInt()) a.add a scan.nextInt() scan.nextInt scan boolean flag = true; flag true for(int i=0;i<N;i++){
            int t = a.get(i);
            if(t%2==0){
                if(!((t%3==0)||(t%5==0))) flag = false;
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            int t = a.get(i);
            if(t%2==0){
                if(!((t%3==0)||(t%5==0))) flag = false;
            }
        } {
            int t = a.get(i);
            if(t%2==0){
                if(!((t%3==0)||(t%5==0))) flag = false;
            }
        } int t = a.get(i); t a.get(i) a.get a i if(t%2==0){
                if(!((t%3==0)||(t%5==0))) flag = false;
            } t%2==0 t%2 t 2 0 {
                if(!((t%3==0)||(t%5==0))) flag = false;
            } if(!((t%3==0)||(t%5==0))) flag = false; !((t%3==0)||(t%5==0)) ((t%3==0)||(t%5==0)) (t%3==0) t%3 t 3 0 (t%5==0) t%5 t 5 0 flag = false flag false if(flag)
            System.out.println("APPROVED");
        else
        System.out.println("DENIED"); flag System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" System.out.println("DENIED") System.out.println System.out System System.out "DENIED" String args[] args static int factorial(int n){
        if(n == 0){
          return 1;
        }
        return n * factorial(n-1);
    } factorial {
        if(n == 0){
          return 1;
        }
        return n * factorial(n-1);
    } if(n == 0){
          return 1;
        } n == 0 n 0 {
          return 1;
        } return 1; 1 return n * factorial(n-1); n * factorial(n-1) n factorial(n-1) factorial n-1 n 1 int n n public class Main{

    static int mod = (int) 1e9 + 7;
    static int dx[] = {-1, 0, 1, 0}, dy[] = {0, -1, 0, 1};
    static int INF = Integer.MAX_VALUE/2;

    public static void main(String args[]){

        Scanner scan = new Scanner(System.in);

        //Queue<int[]> q = new ArrayDeque<int[]>();
        Integer N = new Integer(scan.nextInt());
        ArrayList<Integer> a = new ArrayList<Integer>();

        for(int i=0;i<N;i++) a.add(scan.nextInt());

        boolean flag = true;
        for(int i=0;i<N;i++){
            int t = a.get(i);
            if(t%2==0){
                if(!((t%3==0)||(t%5==0))) flag = false;
            }
        }

        if(flag)
            System.out.println("APPROVED");
        else
        System.out.println("DENIED");
    }

    static int factorial(int n){
        if(n == 0){
          return 1;
        }
        return n * factorial(n-1);
    }


} public class Main{

    static int mod = (int) 1e9 + 7;
    static int dx[] = {-1, 0, 1, 0}, dy[] = {0, -1, 0, 1};
    static int INF = Integer.MAX_VALUE/2;

    public static void main(String args[]){

        Scanner scan = new Scanner(System.in);

        //Queue<int[]> q = new ArrayDeque<int[]>();
        Integer N = new Integer(scan.nextInt());
        ArrayList<Integer> a = new ArrayList<Integer>();

        for(int i=0;i<N;i++) a.add(scan.nextInt());

        boolean flag = true;
        for(int i=0;i<N;i++){
            int t = a.get(i);
            if(t%2==0){
                if(!((t%3==0)||(t%5==0))) flag = false;
            }
        }

        if(flag)
            System.out.println("APPROVED");
        else
        System.out.println("DENIED");
    }

    static int factorial(int n){
        if(n == 0){
          return 1;
        }
        return n * factorial(n-1);
    }


} Main
import java.util.*;

public class Main{

    static int mod = (int) 1e9 + 7;
    static int dx[] = {-1, 0, 1, 0}, dy[] = {0, -1, 0, 1};
    static int INF = Integer.MAX_VALUE/2;

    public static void main(String args[]){

        Scanner scan = new Scanner(System.in);

        //Queue<int[]> q = new ArrayDeque<int[]>();
        Integer N = new Integer(scan.nextInt());
        ArrayList<Integer> a = new ArrayList<Integer>();

        for(int i=0;i<N;i++) a.add(scan.nextInt());

        boolean flag = true;
        for(int i=0;i<N;i++){
            int t = a.get(i);
            if(t%2==0){
                if(!((t%3==0)||(t%5==0))) flag = false;
            }
        }

        if(flag)
            System.out.println("APPROVED");
        else
        System.out.println("DENIED");
    }

    static int factorial(int n){
        if(n == 0){
          return 1;
        }
        return n * factorial(n-1);
    }


}