import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int a;
        boolean b = true;
        for (int i=0;i<n;i++){
            a = scanner.nextInt();
            if (a%2==0){
                if (a%3!=0&&a%5!=0){
                    b = false;
                }
            }

        }
        if (b){
            System.out.println("APPROVED");
        }else {
            System.out.println("DENIED");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int a;
        boolean b = true;
        for (int i=0;i<n;i++){
            a = scanner.nextInt();
            if (a%2==0){
                if (a%3!=0&&a%5!=0){
                    b = false;
                }
            }

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

        }
        if (b){
            System.out.println("APPROVED");
        }else {
            System.out.println("DENIED");
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int a;
        boolean b = true;
        for (int i=0;i<n;i++){
            a = scanner.nextInt();
            if (a%2==0){
                if (a%3!=0&&a%5!=0){
                    b = false;
                }
            }

        }
        if (b){
            System.out.println("APPROVED");
        }else {
            System.out.println("DENIED");
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int a; a boolean b = true; b true for (int i=0;i<n;i++){
            a = scanner.nextInt();
            if (a%2==0){
                if (a%3!=0&&a%5!=0){
                    b = false;
                }
            }

        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            a = scanner.nextInt();
            if (a%2==0){
                if (a%3!=0&&a%5!=0){
                    b = false;
                }
            }

        } {
            a = scanner.nextInt();
            if (a%2==0){
                if (a%3!=0&&a%5!=0){
                    b = false;
                }
            }

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

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

        }
        if (b){
            System.out.println("APPROVED");
        }else {
            System.out.println("DENIED");
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int a;
        boolean b = true;
        for (int i=0;i<n;i++){
            a = scanner.nextInt();
            if (a%2==0){
                if (a%3!=0&&a%5!=0){
                    b = false;
                }
            }

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