
import java.util.Scanner;

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

import java.util.Scanner;

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