import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	
	static BufferedReader br;
	
	public static void main(String[] args) throws IOException{
		br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		if(isApprove()) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	
		br.close();

	}
	
	private static boolean isApprove() throws IOException {
		boolean flg=true;
		String line[] = br.readLine().split(" ");
		
		for(int i=0;i<line.length;i++) {
			int num = Integer.parseInt(line[i]);
			if(num%2==0 && (num%3!=0 && num%5!=0)) {
				flg=false;
			}
		}
		return flg;
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	
	static BufferedReader br;
	
	public static void main(String[] args) throws IOException{
		br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		if(isApprove()) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	
		br.close();

	}
	
	private static boolean isApprove() throws IOException {
		boolean flg=true;
		String line[] = br.readLine().split(" ");
		
		for(int i=0;i<line.length;i++) {
			int num = Integer.parseInt(line[i]);
			if(num%2==0 && (num%3!=0 && num%5!=0)) {
				flg=false;
			}
		}
		return flg;
	}
} Main static BufferedReader br; br public static void main(String[] args) throws IOException{
		br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		if(isApprove()) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	
		br.close();

	} main {
		br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		if(isApprove()) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	
		br.close();

	} br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if(isApprove()) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		} isApprove() isApprove {
			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" br.close() br.close br String[] args args private static boolean isApprove() throws IOException {
		boolean flg=true;
		String line[] = br.readLine().split(" ");
		
		for(int i=0;i<line.length;i++) {
			int num = Integer.parseInt(line[i]);
			if(num%2==0 && (num%3!=0 && num%5!=0)) {
				flg=false;
			}
		}
		return flg;
	} isApprove {
		boolean flg=true;
		String line[] = br.readLine().split(" ");
		
		for(int i=0;i<line.length;i++) {
			int num = Integer.parseInt(line[i]);
			if(num%2==0 && (num%3!=0 && num%5!=0)) {
				flg=false;
			}
		}
		return flg;
	} boolean flg=true; flg true String line[] = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int i=0;i<line.length;i++) {
			int num = Integer.parseInt(line[i]);
			if(num%2==0 && (num%3!=0 && num%5!=0)) {
				flg=false;
			}
		} int i=0; int i=0; i 0 i<line.length i line.length line line.length i++ i++ i {
			int num = Integer.parseInt(line[i]);
			if(num%2==0 && (num%3!=0 && num%5!=0)) {
				flg=false;
			}
		} {
			int num = Integer.parseInt(line[i]);
			if(num%2==0 && (num%3!=0 && num%5!=0)) {
				flg=false;
			}
		} int num = Integer.parseInt(line[i]); num Integer.parseInt(line[i]) Integer.parseInt Integer line[i] line i if(num%2==0 && (num%3!=0 && num%5!=0)) {
				flg=false;
			} num%2==0 && (num%3!=0 && num%5!=0) num%2==0 num%2 num 2 0 (num%3!=0 && num%5!=0) num%3!=0 num%3 num 3 0 num%5!=0 num%5 num 5 0 {
				flg=false;
			} flg=false flg false return flg; flg public class Main {
	
	static BufferedReader br;
	
	public static void main(String[] args) throws IOException{
		br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		if(isApprove()) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	
		br.close();

	}
	
	private static boolean isApprove() throws IOException {
		boolean flg=true;
		String line[] = br.readLine().split(" ");
		
		for(int i=0;i<line.length;i++) {
			int num = Integer.parseInt(line[i]);
			if(num%2==0 && (num%3!=0 && num%5!=0)) {
				flg=false;
			}
		}
		return flg;
	}
} public class Main {
	
	static BufferedReader br;
	
	public static void main(String[] args) throws IOException{
		br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		if(isApprove()) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	
		br.close();

	}
	
	private static boolean isApprove() throws IOException {
		boolean flg=true;
		String line[] = br.readLine().split(" ");
		
		for(int i=0;i<line.length;i++) {
			int num = Integer.parseInt(line[i]);
			if(num%2==0 && (num%3!=0 && num%5!=0)) {
				flg=false;
			}
		}
		return flg;
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	
	static BufferedReader br;
	
	public static void main(String[] args) throws IOException{
		br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		
		if(isApprove()) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	
		br.close();

	}
	
	private static boolean isApprove() throws IOException {
		boolean flg=true;
		String line[] = br.readLine().split(" ");
		
		for(int i=0;i<line.length;i++) {
			int num = Integer.parseInt(line[i]);
			if(num%2==0 && (num%3!=0 && num%5!=0)) {
				flg=false;
			}
		}
		return flg;
	}
}
