import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int N=sc.nextInt();
		boolean f=true;
		for(int i=0;i<N;i++ ) {
			int t=sc.nextInt();
			if(f&&t%2==0) {
				if(t%3==0||t%5==0) {
					continue;
				}else {
					f=false;
					break;
				}
			}
		}
		System.out.println(f?"APPROVED":"DENIED");
	}
} import java.util.Scanner; Scanner java.util public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int N=sc.nextInt();
		boolean f=true;
		for(int i=0;i<N;i++ ) {
			int t=sc.nextInt();
			if(f&&t%2==0) {
				if(t%3==0||t%5==0) {
					continue;
				}else {
					f=false;
					break;
				}
			}
		}
		System.out.println(f?"APPROVED":"DENIED");
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		int N=sc.nextInt();
		boolean f=true;
		for(int i=0;i<N;i++ ) {
			int t=sc.nextInt();
			if(f&&t%2==0) {
				if(t%3==0||t%5==0) {
					continue;
				}else {
					f=false;
					break;
				}
			}
		}
		System.out.println(f?"APPROVED":"DENIED");
	} main {
		int N=sc.nextInt();
		boolean f=true;
		for(int i=0;i<N;i++ ) {
			int t=sc.nextInt();
			if(f&&t%2==0) {
				if(t%3==0||t%5==0) {
					continue;
				}else {
					f=false;
					break;
				}
			}
		}
		System.out.println(f?"APPROVED":"DENIED");
	} int N=sc.nextInt(); N sc.nextInt() sc.nextInt sc boolean f=true; f true for(int i=0;i<N;i++ ) {
			int t=sc.nextInt();
			if(f&&t%2==0) {
				if(t%3==0||t%5==0) {
					continue;
				}else {
					f=false;
					break;
				}
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			int t=sc.nextInt();
			if(f&&t%2==0) {
				if(t%3==0||t%5==0) {
					continue;
				}else {
					f=false;
					break;
				}
			}
		} {
			int t=sc.nextInt();
			if(f&&t%2==0) {
				if(t%3==0||t%5==0) {
					continue;
				}else {
					f=false;
					break;
				}
			}
		} int t=sc.nextInt(); t sc.nextInt() sc.nextInt sc if(f&&t%2==0) {
				if(t%3==0||t%5==0) {
					continue;
				}else {
					f=false;
					break;
				}
			} f&&t%2==0 f t%2==0 t%2 t 2 0 {
				if(t%3==0||t%5==0) {
					continue;
				}else {
					f=false;
					break;
				}
			} if(t%3==0||t%5==0) {
					continue;
				}else {
					f=false;
					break;
				} t%3==0||t%5==0 t%3==0 t%3 t 3 0 t%5==0 t%5 t 5 0 {
					continue;
				} continue; {
					f=false;
					break;
				} f=false f false break; System.out.println(f?"APPROVED":"DENIED") System.out.println System.out System System.out f?"APPROVED":"DENIED" f "APPROVED" "DENIED" String[] args args public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int N=sc.nextInt();
		boolean f=true;
		for(int i=0;i<N;i++ ) {
			int t=sc.nextInt();
			if(f&&t%2==0) {
				if(t%3==0||t%5==0) {
					continue;
				}else {
					f=false;
					break;
				}
			}
		}
		System.out.println(f?"APPROVED":"DENIED");
	}
} public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int N=sc.nextInt();
		boolean f=true;
		for(int i=0;i<N;i++ ) {
			int t=sc.nextInt();
			if(f&&t%2==0) {
				if(t%3==0||t%5==0) {
					continue;
				}else {
					f=false;
					break;
				}
			}
		}
		System.out.println(f?"APPROVED":"DENIED");
	}
} Main
import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int N=sc.nextInt();
		boolean f=true;
		for(int i=0;i<N;i++ ) {
			int t=sc.nextInt();
			if(f&&t%2==0) {
				if(t%3==0||t%5==0) {
					continue;
				}else {
					f=false;
					break;
				}
			}
		}
		System.out.println(f?"APPROVED":"DENIED");
	}
}
