import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

        String ans = "APPROVED";
        int tmp;
        for (int i = 0; i < N; i++) {
             tmp = sc.nextInt();
             if(tmp % 2 == 0){
                 if(tmp % 3 != 0 && tmp % 5 != 0){
                     ans = "DENIED";
                 }
             }
        }

        System.out.println(ans);

    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

        String ans = "APPROVED";
        int tmp;
        for (int i = 0; i < N; i++) {
             tmp = sc.nextInt();
             if(tmp % 2 == 0){
                 if(tmp % 3 != 0 && tmp % 5 != 0){
                     ans = "DENIED";
                 }
             }
        }

        System.out.println(ans);

    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

        String ans = "APPROVED";
        int tmp;
        for (int i = 0; i < N; i++) {
             tmp = sc.nextInt();
             if(tmp % 2 == 0){
                 if(tmp % 3 != 0 && tmp % 5 != 0){
                     ans = "DENIED";
                 }
             }
        }

        System.out.println(ans);

    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

        String ans = "APPROVED";
        int tmp;
        for (int i = 0; i < N; i++) {
             tmp = sc.nextInt();
             if(tmp % 2 == 0){
                 if(tmp % 3 != 0 && tmp % 5 != 0){
                     ans = "DENIED";
                 }
             }
        }

        System.out.println(ans);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String ans = "APPROVED"; ans "APPROVED" int tmp; tmp for (int i = 0; i < N; i++) {
             tmp = sc.nextInt();
             if(tmp % 2 == 0){
                 if(tmp % 3 != 0 && tmp % 5 != 0){
                     ans = "DENIED";
                 }
             }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
             tmp = sc.nextInt();
             if(tmp % 2 == 0){
                 if(tmp % 3 != 0 && tmp % 5 != 0){
                     ans = "DENIED";
                 }
             }
        } {
             tmp = sc.nextInt();
             if(tmp % 2 == 0){
                 if(tmp % 3 != 0 && tmp % 5 != 0){
                     ans = "DENIED";
                 }
             }
        } tmp = sc.nextInt() tmp sc.nextInt() sc.nextInt sc if(tmp % 2 == 0){
                 if(tmp % 3 != 0 && tmp % 5 != 0){
                     ans = "DENIED";
                 }
             } tmp % 2 == 0 tmp % 2 tmp 2 0 {
                 if(tmp % 3 != 0 && tmp % 5 != 0){
                     ans = "DENIED";
                 }
             } if(tmp % 3 != 0 && tmp % 5 != 0){
                     ans = "DENIED";
                 } tmp % 3 != 0 && tmp % 5 != 0 tmp % 3 != 0 tmp % 3 tmp 3 0 tmp % 5 != 0 tmp % 5 tmp 5 0 {
                     ans = "DENIED";
                 } ans = "DENIED" ans "DENIED" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

        String ans = "APPROVED";
        int tmp;
        for (int i = 0; i < N; i++) {
             tmp = sc.nextInt();
             if(tmp % 2 == 0){
                 if(tmp % 3 != 0 && tmp % 5 != 0){
                     ans = "DENIED";
                 }
             }
        }

        System.out.println(ans);

    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

        String ans = "APPROVED";
        int tmp;
        for (int i = 0; i < N; i++) {
             tmp = sc.nextInt();
             if(tmp % 2 == 0){
                 if(tmp % 3 != 0 && tmp % 5 != 0){
                     ans = "DENIED";
                 }
             }
        }

        System.out.println(ans);

    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

        String ans = "APPROVED";
        int tmp;
        for (int i = 0; i < N; i++) {
             tmp = sc.nextInt();
             if(tmp % 2 == 0){
                 if(tmp % 3 != 0 && tmp % 5 != 0){
                     ans = "DENIED";
                 }
             }
        }

        System.out.println(ans);

    }
}