import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        List<Integer> B = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            if (A[i] % 2 == 0) {
                B.add(A[i]);
            }
        }

        int count = 0;
        if (B == null) {
            System.out.println("DENIED");
        } else {
            for (int i = 0; i < B.size(); i++) {
                if (B.get(i) % 3 == 0 || B.get(i) % 5 == 0) {
                    count++;
                } 
            }
            if (count == B.size()) {
                System.out.println("APPROVED");
            } else {
                System.out.println("DENIED");
            }
        }
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        List<Integer> B = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            if (A[i] % 2 == 0) {
                B.add(A[i]);
            }
        }

        int count = 0;
        if (B == null) {
            System.out.println("DENIED");
        } else {
            for (int i = 0; i < B.size(); i++) {
                if (B.get(i) % 3 == 0 || B.get(i) % 5 == 0) {
                    count++;
                } 
            }
            if (count == B.size()) {
                System.out.println("APPROVED");
            } else {
                System.out.println("DENIED");
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        List<Integer> B = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            if (A[i] % 2 == 0) {
                B.add(A[i]);
            }
        }

        int count = 0;
        if (B == null) {
            System.out.println("DENIED");
        } else {
            for (int i = 0; i < B.size(); i++) {
                if (B.get(i) % 3 == 0 || B.get(i) % 5 == 0) {
                    count++;
                } 
            }
            if (count == B.size()) {
                System.out.println("APPROVED");
            } else {
                System.out.println("DENIED");
            }
        }
    } main {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        List<Integer> B = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            if (A[i] % 2 == 0) {
                B.add(A[i]);
            }
        }

        int count = 0;
        if (B == null) {
            System.out.println("DENIED");
        } else {
            for (int i = 0; i < B.size(); i++) {
                if (B.get(i) % 3 == 0 || B.get(i) % 5 == 0) {
                    count++;
                } 
            }
            if (count == B.size()) {
                System.out.println("APPROVED");
            } else {
                System.out.println("DENIED");
            }
        }
    } 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[N]; A new int[N] N 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 stdIn.close() stdIn.close stdIn List<Integer> B = new ArrayList<>(); B new ArrayList<>() for (int i = 0; i < N; i++) {
            if (A[i] % 2 == 0) {
                B.add(A[i]);
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if (A[i] % 2 == 0) {
                B.add(A[i]);
            }
        } {
            if (A[i] % 2 == 0) {
                B.add(A[i]);
            }
        } if (A[i] % 2 == 0) {
                B.add(A[i]);
            } A[i] % 2 == 0 A[i] % 2 A[i] A i 2 0 {
                B.add(A[i]);
            } B.add(A[i]) B.add B A[i] A i int count = 0; count 0 if (B == null) {
            System.out.println("DENIED");
        } else {
            for (int i = 0; i < B.size(); i++) {
                if (B.get(i) % 3 == 0 || B.get(i) % 5 == 0) {
                    count++;
                } 
            }
            if (count == B.size()) {
                System.out.println("APPROVED");
            } else {
                System.out.println("DENIED");
            }
        } B == null B null {
            System.out.println("DENIED");
        } System.out.println("DENIED") System.out.println System.out System System.out "DENIED" {
            for (int i = 0; i < B.size(); i++) {
                if (B.get(i) % 3 == 0 || B.get(i) % 5 == 0) {
                    count++;
                } 
            }
            if (count == B.size()) {
                System.out.println("APPROVED");
            } else {
                System.out.println("DENIED");
            }
        } for (int i = 0; i < B.size(); i++) {
                if (B.get(i) % 3 == 0 || B.get(i) % 5 == 0) {
                    count++;
                } 
            } int i = 0; int i = 0; i 0 i < B.size() i B.size() B.size B i++ i++ i {
                if (B.get(i) % 3 == 0 || B.get(i) % 5 == 0) {
                    count++;
                } 
            } {
                if (B.get(i) % 3 == 0 || B.get(i) % 5 == 0) {
                    count++;
                } 
            } if (B.get(i) % 3 == 0 || B.get(i) % 5 == 0) {
                    count++;
                } B.get(i) % 3 == 0 || B.get(i) % 5 == 0 B.get(i) % 3 == 0 B.get(i) % 3 B.get(i) B.get B i 3 0 B.get(i) % 5 == 0 B.get(i) % 5 B.get(i) B.get B i 5 0 {
                    count++;
                } count++ count if (count == B.size()) {
                System.out.println("APPROVED");
            } else {
                System.out.println("DENIED");
            } count == B.size() count B.size() B.size B {
                System.out.println("APPROVED");
            } System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" {
                System.out.println("DENIED");
            } System.out.println("DENIED") System.out.println System.out System System.out "DENIED" String[] args args public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        List<Integer> B = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            if (A[i] % 2 == 0) {
                B.add(A[i]);
            }
        }

        int count = 0;
        if (B == null) {
            System.out.println("DENIED");
        } else {
            for (int i = 0; i < B.size(); i++) {
                if (B.get(i) % 3 == 0 || B.get(i) % 5 == 0) {
                    count++;
                } 
            }
            if (count == B.size()) {
                System.out.println("APPROVED");
            } else {
                System.out.println("DENIED");
            }
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        List<Integer> B = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            if (A[i] % 2 == 0) {
                B.add(A[i]);
            }
        }

        int count = 0;
        if (B == null) {
            System.out.println("DENIED");
        } else {
            for (int i = 0; i < B.size(); i++) {
                if (B.get(i) % 3 == 0 || B.get(i) % 5 == 0) {
                    count++;
                } 
            }
            if (count == B.size()) {
                System.out.println("APPROVED");
            } else {
                System.out.println("DENIED");
            }
        }
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        List<Integer> B = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            if (A[i] % 2 == 0) {
                B.add(A[i]);
            }
        }

        int count = 0;
        if (B == null) {
            System.out.println("DENIED");
        } else {
            for (int i = 0; i < B.size(); i++) {
                if (B.get(i) % 3 == 0 || B.get(i) % 5 == 0) {
                    count++;
                } 
            }
            if (count == B.size()) {
                System.out.println("APPROVED");
            } else {
                System.out.println("DENIED");
            }
        }
    }
}