import java.util.*;
public class Main {

    public static void main(String[] args) {
        Scanner  yomi = new Scanner(System.in);
        int a = yomi.nextInt();
        boolean tf=true;
        int[] n = new int[a];
        for (int i=0;i<a;i++){
            n[i] = yomi.nextInt();
    }
        for (int i=0;i<a;i++){
            if (n[i]%2==0){
                if (n[i]%3==0||n[i]%5==0){

                }else tf=false;
            }
        }
        if (tf){
            System.out.println("APPROVED");
        }else System.out.println("DENIED");
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner  yomi = new Scanner(System.in);
        int a = yomi.nextInt();
        boolean tf=true;
        int[] n = new int[a];
        for (int i=0;i<a;i++){
            n[i] = yomi.nextInt();
    }
        for (int i=0;i<a;i++){
            if (n[i]%2==0){
                if (n[i]%3==0||n[i]%5==0){

                }else tf=false;
            }
        }
        if (tf){
            System.out.println("APPROVED");
        }else System.out.println("DENIED");
    }
} Main public static void main(String[] args) {
        Scanner  yomi = new Scanner(System.in);
        int a = yomi.nextInt();
        boolean tf=true;
        int[] n = new int[a];
        for (int i=0;i<a;i++){
            n[i] = yomi.nextInt();
    }
        for (int i=0;i<a;i++){
            if (n[i]%2==0){
                if (n[i]%3==0||n[i]%5==0){

                }else tf=false;
            }
        }
        if (tf){
            System.out.println("APPROVED");
        }else System.out.println("DENIED");
    } main {
        Scanner  yomi = new Scanner(System.in);
        int a = yomi.nextInt();
        boolean tf=true;
        int[] n = new int[a];
        for (int i=0;i<a;i++){
            n[i] = yomi.nextInt();
    }
        for (int i=0;i<a;i++){
            if (n[i]%2==0){
                if (n[i]%3==0||n[i]%5==0){

                }else tf=false;
            }
        }
        if (tf){
            System.out.println("APPROVED");
        }else System.out.println("DENIED");
    } Scanner  yomi = new Scanner(System.in); yomi new Scanner(System.in) int a = yomi.nextInt(); a yomi.nextInt() yomi.nextInt yomi boolean tf=true; tf true int[] n = new int[a]; n new int[a] a for (int i=0;i<a;i++){
            n[i] = yomi.nextInt();
    } int i=0; int i=0; i 0 i<a i a i++ i++ i {
            n[i] = yomi.nextInt();
    } {
            n[i] = yomi.nextInt();
    } n[i] = yomi.nextInt() n[i] n i yomi.nextInt() yomi.nextInt yomi for (int i=0;i<a;i++){
            if (n[i]%2==0){
                if (n[i]%3==0||n[i]%5==0){

                }else tf=false;
            }
        } int i=0; int i=0; i 0 i<a i a i++ i++ i {
            if (n[i]%2==0){
                if (n[i]%3==0||n[i]%5==0){

                }else tf=false;
            }
        } {
            if (n[i]%2==0){
                if (n[i]%3==0||n[i]%5==0){

                }else tf=false;
            }
        } if (n[i]%2==0){
                if (n[i]%3==0||n[i]%5==0){

                }else tf=false;
            } n[i]%2==0 n[i]%2 n[i] n i 2 0 {
                if (n[i]%3==0||n[i]%5==0){

                }else tf=false;
            } if (n[i]%3==0||n[i]%5==0){

                }else tf=false; n[i]%3==0||n[i]%5==0 n[i]%3==0 n[i]%3 n[i] n i 3 0 n[i]%5==0 n[i]%5 n[i] n i 5 0 {

                } tf=false tf false if (tf){
            System.out.println("APPROVED");
        }else System.out.println("DENIED"); tf {
            System.out.println("APPROVED");
        } System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" 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  yomi = new Scanner(System.in);
        int a = yomi.nextInt();
        boolean tf=true;
        int[] n = new int[a];
        for (int i=0;i<a;i++){
            n[i] = yomi.nextInt();
    }
        for (int i=0;i<a;i++){
            if (n[i]%2==0){
                if (n[i]%3==0||n[i]%5==0){

                }else tf=false;
            }
        }
        if (tf){
            System.out.println("APPROVED");
        }else System.out.println("DENIED");
    }
} public class Main {

    public static void main(String[] args) {
        Scanner  yomi = new Scanner(System.in);
        int a = yomi.nextInt();
        boolean tf=true;
        int[] n = new int[a];
        for (int i=0;i<a;i++){
            n[i] = yomi.nextInt();
    }
        for (int i=0;i<a;i++){
            if (n[i]%2==0){
                if (n[i]%3==0||n[i]%5==0){

                }else tf=false;
            }
        }
        if (tf){
            System.out.println("APPROVED");
        }else System.out.println("DENIED");
    }
} Main
import java.util.*;
public class Main {

    public static void main(String[] args) {
        Scanner  yomi = new Scanner(System.in);
        int a = yomi.nextInt();
        boolean tf=true;
        int[] n = new int[a];
        for (int i=0;i<a;i++){
            n[i] = yomi.nextInt();
    }
        for (int i=0;i<a;i++){
            if (n[i]%2==0){
                if (n[i]%3==0||n[i]%5==0){

                }else tf=false;
            }
        }
        if (tf){
            System.out.println("APPROVED");
        }else System.out.println("DENIED");
    }
}