import java.util.Scanner;

// B - Papers, Please
// https://atcoder.jp/contests/abc155/tasks/abc155_b
public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        for (int i = 0; i < N; i++) {
            int num = Integer.parseInt(scanner.next());
            if (num % 2 == 0) {
                if (!(num % 3 == 0 || num % 5 == 0)) {
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        scanner.close();

        System.out.println("APPROVED");
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        for (int i = 0; i < N; i++) {
            int num = Integer.parseInt(scanner.next());
            if (num % 2 == 0) {
                if (!(num % 3 == 0 || num % 5 == 0)) {
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        scanner.close();

        System.out.println("APPROVED");
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        for (int i = 0; i < N; i++) {
            int num = Integer.parseInt(scanner.next());
            if (num % 2 == 0) {
                if (!(num % 3 == 0 || num % 5 == 0)) {
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        scanner.close();

        System.out.println("APPROVED");
    } main {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        for (int i = 0; i < N; i++) {
            int num = Integer.parseInt(scanner.next());
            if (num % 2 == 0) {
                if (!(num % 3 == 0 || num % 5 == 0)) {
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        scanner.close();

        System.out.println("APPROVED");
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = Integer.parseInt(scanner.next()); N Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner for (int i = 0; i < N; i++) {
            int num = Integer.parseInt(scanner.next());
            if (num % 2 == 0) {
                if (!(num % 3 == 0 || num % 5 == 0)) {
                    System.out.println("DENIED");
                    return;
                }
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int num = Integer.parseInt(scanner.next());
            if (num % 2 == 0) {
                if (!(num % 3 == 0 || num % 5 == 0)) {
                    System.out.println("DENIED");
                    return;
                }
            }
        } {
            int num = Integer.parseInt(scanner.next());
            if (num % 2 == 0) {
                if (!(num % 3 == 0 || num % 5 == 0)) {
                    System.out.println("DENIED");
                    return;
                }
            }
        } int num = Integer.parseInt(scanner.next()); num Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner if (num % 2 == 0) {
                if (!(num % 3 == 0 || num % 5 == 0)) {
                    System.out.println("DENIED");
                    return;
                }
            } num % 2 == 0 num % 2 num 2 0 {
                if (!(num % 3 == 0 || num % 5 == 0)) {
                    System.out.println("DENIED");
                    return;
                }
            } if (!(num % 3 == 0 || num % 5 == 0)) {
                    System.out.println("DENIED");
                    return;
                } !(num % 3 == 0 || num % 5 == 0) (num % 3 == 0 || num % 5 == 0) num % 3 == 0 num % 3 num 3 0 num % 5 == 0 num % 5 num 5 0 {
                    System.out.println("DENIED");
                    return;
                } System.out.println("DENIED") System.out.println System.out System System.out "DENIED" return; scanner.close() scanner.close scanner System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        for (int i = 0; i < N; i++) {
            int num = Integer.parseInt(scanner.next());
            if (num % 2 == 0) {
                if (!(num % 3 == 0 || num % 5 == 0)) {
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        scanner.close();

        System.out.println("APPROVED");
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        for (int i = 0; i < N; i++) {
            int num = Integer.parseInt(scanner.next());
            if (num % 2 == 0) {
                if (!(num % 3 == 0 || num % 5 == 0)) {
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        scanner.close();

        System.out.println("APPROVED");
    }
} Main
import java.util.Scanner;

// B - Papers, Please
// https://atcoder.jp/contests/abc155/tasks/abc155_b
public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = Integer.parseInt(scanner.next());
        for (int i = 0; i < N; i++) {
            int num = Integer.parseInt(scanner.next());
            if (num % 2 == 0) {
                if (!(num % 3 == 0 || num % 5 == 0)) {
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        scanner.close();

        System.out.println("APPROVED");
    }
}
