import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        String answer = "APPROVED";
        for (int i = 0; i < n; i++) {
            int num = Integer.parseInt(sc.next());
            if ((num % 2) != 0) {
                continue;
            }
            if (((num % 3) == 0) || ((num % 5) == 0)) {
                continue;
            } else {
                answer = "DENIED";
                break;
            }
        }
        System.out.println(answer);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {

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

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

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        String answer = "APPROVED";
        for (int i = 0; i < n; i++) {
            int num = Integer.parseInt(sc.next());
            if ((num % 2) != 0) {
                continue;
            }
            if (((num % 3) == 0) || ((num % 5) == 0)) {
                continue;
            } else {
                answer = "DENIED";
                break;
            }
        }
        System.out.println(answer);
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {

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