import java.io.*;

public class Main {

	final static long MOD = 1000000007;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);
		W = in.readLine();
		String[] Ws = W.split(" ");

		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		String ans = "APPROVED";
		for(int i=0;i<N;i++){
			if(A[i]%2 == 0 && !(A[i]%3==0 || A[i]%5==0)){
				ans="DENIED";
				break;
			}
		}
		System.out.println(ans);

	}

} import java.io.*; io.* java public class Main {

	final static long MOD = 1000000007;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);
		W = in.readLine();
		String[] Ws = W.split(" ");

		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		String ans = "APPROVED";
		for(int i=0;i<N;i++){
			if(A[i]%2 == 0 && !(A[i]%3==0 || A[i]%5==0)){
				ans="DENIED";
				break;
			}
		}
		System.out.println(ans);

	}

} Main final static long MOD = 1000000007; MOD 1000000007 public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);
		W = in.readLine();
		String[] Ws = W.split(" ");

		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		String ans = "APPROVED";
		for(int i=0;i<N;i++){
			if(A[i]%2 == 0 && !(A[i]%3==0 || A[i]%5==0)){
				ans="DENIED";
				break;
			}
		}
		System.out.println(ans);

	} main {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);
		W = in.readLine();
		String[] Ws = W.split(" ");

		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		String ans = "APPROVED";
		for(int i=0;i<N;i++){
			if(A[i]%2 == 0 && !(A[i]%3==0 || A[i]%5==0)){
				ans="DENIED";
				break;
			}
		}
		System.out.println(ans);

	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String W = in.readLine(); W in.readLine() in.readLine in int N = Integer.parseInt(W); N Integer.parseInt(W) Integer.parseInt Integer W W = in.readLine() W in.readLine() in.readLine in String[] Ws = W.split(" "); Ws W.split(" ") W.split W " " long[] A = new long[Ws.length]; A new long[Ws.length] Ws.length Ws Ws.length for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		} int i = 0; int i = 0; i 0 i < Ws.length i Ws.length Ws Ws.length i++ i++ i {
			A[i] = Long.parseLong(Ws[i]);
		} {
			A[i] = Long.parseLong(Ws[i]);
		} A[i] = Long.parseLong(Ws[i]) A[i] A i Long.parseLong(Ws[i]) Long.parseLong Long Ws[i] Ws i String ans = "APPROVED"; ans "APPROVED" for(int i=0;i<N;i++){
			if(A[i]%2 == 0 && !(A[i]%3==0 || A[i]%5==0)){
				ans="DENIED";
				break;
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			if(A[i]%2 == 0 && !(A[i]%3==0 || A[i]%5==0)){
				ans="DENIED";
				break;
			}
		} {
			if(A[i]%2 == 0 && !(A[i]%3==0 || A[i]%5==0)){
				ans="DENIED";
				break;
			}
		} if(A[i]%2 == 0 && !(A[i]%3==0 || A[i]%5==0)){
				ans="DENIED";
				break;
			} A[i]%2 == 0 && !(A[i]%3==0 || A[i]%5==0) A[i]%2 == 0 A[i]%2 A[i] A i 2 0 !(A[i]%3==0 || A[i]%5==0) (A[i]%3==0 || A[i]%5==0) A[i]%3==0 A[i]%3 A[i] A i 3 0 A[i]%5==0 A[i]%5 A[i] A i 5 0 {
				ans="DENIED";
				break;
			} ans="DENIED" ans "DENIED" break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	final static long MOD = 1000000007;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);
		W = in.readLine();
		String[] Ws = W.split(" ");

		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		String ans = "APPROVED";
		for(int i=0;i<N;i++){
			if(A[i]%2 == 0 && !(A[i]%3==0 || A[i]%5==0)){
				ans="DENIED";
				break;
			}
		}
		System.out.println(ans);

	}

} public class Main {

	final static long MOD = 1000000007;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);
		W = in.readLine();
		String[] Ws = W.split(" ");

		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		String ans = "APPROVED";
		for(int i=0;i<N;i++){
			if(A[i]%2 == 0 && !(A[i]%3==0 || A[i]%5==0)){
				ans="DENIED";
				break;
			}
		}
		System.out.println(ans);

	}

} Main
import java.io.*;

public class Main {

	final static long MOD = 1000000007;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);
		W = in.readLine();
		String[] Ws = W.split(" ");

		long[] A = new long[Ws.length];
		for (int i = 0; i < Ws.length; i++) {
			A[i] = Long.parseLong(Ws[i]);
		}

		String ans = "APPROVED";
		for(int i=0;i<N;i++){
			if(A[i]%2 == 0 && !(A[i]%3==0 || A[i]%5==0)){
				ans="DENIED";
				break;
			}
		}
		System.out.println(ans);

	}

}
