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