public class Main {

    public static void main(String[] args) {

        java.util.Scanner sc = new java.util.Scanner(System.in);
        // 数値
        int n1 = sc.nextInt();
        boolean flg = false;
        for (int i = 1; i <= n1; i++) {
            int n = sc.nextInt();
            if (n % 2 == 0) {
                if (!(n % 3 == 0 || n % 5 == 0)) {
                    flg = true;
                    break;
                }
            }
        }

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

    }
} public class Main {

    public static void main(String[] args) {

        java.util.Scanner sc = new java.util.Scanner(System.in);
        // 数値
        int n1 = sc.nextInt();
        boolean flg = false;
        for (int i = 1; i <= n1; i++) {
            int n = sc.nextInt();
            if (n % 2 == 0) {
                if (!(n % 3 == 0 || n % 5 == 0)) {
                    flg = true;
                    break;
                }
            }
        }

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

    }
} Main public static void main(String[] args) {

        java.util.Scanner sc = new java.util.Scanner(System.in);
        // 数値
        int n1 = sc.nextInt();
        boolean flg = false;
        for (int i = 1; i <= n1; i++) {
            int n = sc.nextInt();
            if (n % 2 == 0) {
                if (!(n % 3 == 0 || n % 5 == 0)) {
                    flg = true;
                    break;
                }
            }
        }

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

    } main {

        java.util.Scanner sc = new java.util.Scanner(System.in);
        // 数値
        int n1 = sc.nextInt();
        boolean flg = false;
        for (int i = 1; i <= n1; i++) {
            int n = sc.nextInt();
            if (n % 2 == 0) {
                if (!(n % 3 == 0 || n % 5 == 0)) {
                    flg = true;
                    break;
                }
            }
        }

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

    } java.util.Scanner sc = new java.util.Scanner(System.in); sc new java.util.Scanner(System.in) int n1 = sc.nextInt(); n1 sc.nextInt() sc.nextInt sc boolean flg = false; flg false for (int i = 1; i <= n1; i++) {
            int n = sc.nextInt();
            if (n % 2 == 0) {
                if (!(n % 3 == 0 || n % 5 == 0)) {
                    flg = true;
                    break;
                }
            }
        } int i = 1; int i = 1; i 1 i <= n1 i n1 i++ i++ i {
            int n = sc.nextInt();
            if (n % 2 == 0) {
                if (!(n % 3 == 0 || n % 5 == 0)) {
                    flg = true;
                    break;
                }
            }
        } {
            int n = sc.nextInt();
            if (n % 2 == 0) {
                if (!(n % 3 == 0 || n % 5 == 0)) {
                    flg = true;
                    break;
                }
            }
        } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc if (n % 2 == 0) {
                if (!(n % 3 == 0 || n % 5 == 0)) {
                    flg = true;
                    break;
                }
            } n % 2 == 0 n % 2 n 2 0 {
                if (!(n % 3 == 0 || n % 5 == 0)) {
                    flg = true;
                    break;
                }
            } if (!(n % 3 == 0 || n % 5 == 0)) {
                    flg = true;
                    break;
                } !(n % 3 == 0 || n % 5 == 0) (n % 3 == 0 || n % 5 == 0) n % 3 == 0 n % 3 n 3 0 n % 5 == 0 n % 5 n 5 0 {
                    flg = true;
                    break;
                } flg = true flg true break; if (flg) {
            System.out.println("DENIED");
        } else {
            System.out.println("APPROVED");
        } flg {
            System.out.println("DENIED");
        } System.out.println("DENIED") System.out.println System.out System System.out "DENIED" {
            System.out.println("APPROVED");
        } 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) {

        java.util.Scanner sc = new java.util.Scanner(System.in);
        // 数値
        int n1 = sc.nextInt();
        boolean flg = false;
        for (int i = 1; i <= n1; i++) {
            int n = sc.nextInt();
            if (n % 2 == 0) {
                if (!(n % 3 == 0 || n % 5 == 0)) {
                    flg = true;
                    break;
                }
            }
        }

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

    }
} public class Main {

    public static void main(String[] args) {

        java.util.Scanner sc = new java.util.Scanner(System.in);
        // 数値
        int n1 = sc.nextInt();
        boolean flg = false;
        for (int i = 1; i <= n1; i++) {
            int n = sc.nextInt();
            if (n % 2 == 0) {
                if (!(n % 3 == 0 || n % 5 == 0)) {
                    flg = true;
                    break;
                }
            }
        }

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

    }
} Main
public class Main {

    public static void main(String[] args) {

        java.util.Scanner sc = new java.util.Scanner(System.in);
        // 数値
        int n1 = sc.nextInt();
        boolean flg = false;
        for (int i = 1; i <= n1; i++) {
            int n = sc.nextInt();
            if (n % 2 == 0) {
                if (!(n % 3 == 0 || n % 5 == 0)) {
                    flg = true;
                    break;
                }
            }
        }

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

    }
}
