import java.util.ArrayList;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		String result = "APPROVED";
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		for(int i=0; i<n; i++) {
			int a = in.nextInt();
			if(a%2==0) {
				if(a%3==0 || a%5==0) {
					continue;
				}else {
					result = "DENIED";
					break;
				}
			}
		}
		System.out.println(result);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String[] args) {
		String result = "APPROVED";
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		for(int i=0; i<n; i++) {
			int a = in.nextInt();
			if(a%2==0) {
				if(a%3==0 || a%5==0) {
					continue;
				}else {
					result = "DENIED";
					break;
				}
			}
		}
		System.out.println(result);
	}
} Main public static void main(String[] args) {
		String result = "APPROVED";
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		for(int i=0; i<n; i++) {
			int a = in.nextInt();
			if(a%2==0) {
				if(a%3==0 || a%5==0) {
					continue;
				}else {
					result = "DENIED";
					break;
				}
			}
		}
		System.out.println(result);
	} main {
		String result = "APPROVED";
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		for(int i=0; i<n; i++) {
			int a = in.nextInt();
			if(a%2==0) {
				if(a%3==0 || a%5==0) {
					continue;
				}else {
					result = "DENIED";
					break;
				}
			}
		}
		System.out.println(result);
	} String result = "APPROVED"; result "APPROVED" Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in for(int i=0; i<n; i++) {
			int a = in.nextInt();
			if(a%2==0) {
				if(a%3==0 || a%5==0) {
					continue;
				}else {
					result = "DENIED";
					break;
				}
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int a = in.nextInt();
			if(a%2==0) {
				if(a%3==0 || a%5==0) {
					continue;
				}else {
					result = "DENIED";
					break;
				}
			}
		} {
			int a = in.nextInt();
			if(a%2==0) {
				if(a%3==0 || a%5==0) {
					continue;
				}else {
					result = "DENIED";
					break;
				}
			}
		} int a = in.nextInt(); a in.nextInt() in.nextInt in if(a%2==0) {
				if(a%3==0 || a%5==0) {
					continue;
				}else {
					result = "DENIED";
					break;
				}
			} a%2==0 a%2 a 2 0 {
				if(a%3==0 || a%5==0) {
					continue;
				}else {
					result = "DENIED";
					break;
				}
			} if(a%3==0 || a%5==0) {
					continue;
				}else {
					result = "DENIED";
					break;
				} a%3==0 || a%5==0 a%3==0 a%3 a 3 0 a%5==0 a%5 a 5 0 {
					continue;
				} continue; {
					result = "DENIED";
					break;
				} result = "DENIED" result "DENIED" break; System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
	
	public static void main(String[] args) {
		String result = "APPROVED";
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		for(int i=0; i<n; i++) {
			int a = in.nextInt();
			if(a%2==0) {
				if(a%3==0 || a%5==0) {
					continue;
				}else {
					result = "DENIED";
					break;
				}
			}
		}
		System.out.println(result);
	}
} public class Main {
	
	public static void main(String[] args) {
		String result = "APPROVED";
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		for(int i=0; i<n; i++) {
			int a = in.nextInt();
			if(a%2==0) {
				if(a%3==0 || a%5==0) {
					continue;
				}else {
					result = "DENIED";
					break;
				}
			}
		}
		System.out.println(result);
	}
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		String result = "APPROVED";
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		for(int i=0; i<n; i++) {
			int a = in.nextInt();
			if(a%2==0) {
				if(a%3==0 || a%5==0) {
					continue;
				}else {
					result = "DENIED";
					break;
				}
			}
		}
		System.out.println(result);
	}
}
