import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int curr;
        boolean app = true;
        for(int i = 0; i < n; i++){
            curr = sc.nextInt();
            if(curr%2==0){
                if(curr%3!=0&&curr%5!=0){
                    app = false;
                    break;
                }

            }
        }
        if(app)
            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) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int curr;
        boolean app = true;
        for(int i = 0; i < n; i++){
            curr = sc.nextInt();
            if(curr%2==0){
                if(curr%3!=0&&curr%5!=0){
                    app = false;
                    break;
                }

            }
        }
        if(app)
            System.out.println("APPROVED");
        else
            System.out.println("DENIED");
    }
} Main public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int curr;
        boolean app = true;
        for(int i = 0; i < n; i++){
            curr = sc.nextInt();
            if(curr%2==0){
                if(curr%3!=0&&curr%5!=0){
                    app = false;
                    break;
                }

            }
        }
        if(app)
            System.out.println("APPROVED");
        else
            System.out.println("DENIED");
    } main {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int curr;
        boolean app = true;
        for(int i = 0; i < n; i++){
            curr = sc.nextInt();
            if(curr%2==0){
                if(curr%3!=0&&curr%5!=0){
                    app = false;
                    break;
                }

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

            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            curr = sc.nextInt();
            if(curr%2==0){
                if(curr%3!=0&&curr%5!=0){
                    app = false;
                    break;
                }

            }
        } {
            curr = sc.nextInt();
            if(curr%2==0){
                if(curr%3!=0&&curr%5!=0){
                    app = false;
                    break;
                }

            }
        } curr = sc.nextInt() curr sc.nextInt() sc.nextInt sc if(curr%2==0){
                if(curr%3!=0&&curr%5!=0){
                    app = false;
                    break;
                }

            } curr%2==0 curr%2 curr 2 0 {
                if(curr%3!=0&&curr%5!=0){
                    app = false;
                    break;
                }

            } if(curr%3!=0&&curr%5!=0){
                    app = false;
                    break;
                } curr%3!=0&&curr%5!=0 curr%3!=0 curr%3 curr 3 0 curr%5!=0 curr%5 curr 5 0 {
                    app = false;
                    break;
                } app = false app false break; if(app)
            System.out.println("APPROVED");
        else
            System.out.println("DENIED"); app 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) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int curr;
        boolean app = true;
        for(int i = 0; i < n; i++){
            curr = sc.nextInt();
            if(curr%2==0){
                if(curr%3!=0&&curr%5!=0){
                    app = false;
                    break;
                }

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

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int curr;
        boolean app = true;
        for(int i = 0; i < n; i++){
            curr = sc.nextInt();
            if(curr%2==0){
                if(curr%3!=0&&curr%5!=0){
                    app = false;
                    break;
                }

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

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int curr;
        boolean app = true;
        for(int i = 0; i < n; i++){
            curr = sc.nextInt();
            if(curr%2==0){
                if(curr%3!=0&&curr%5!=0){
                    app = false;
                    break;
                }

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