import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int num;
		boolean ap = true;
		while(sc.hasNext()) {
			num = sc.nextInt();
			if(num%2!=0) continue;
			if(num%3!=0 && num%5!=0) {
				System.out.println("DENIED");
				ap = false;
				break;
			}
		}
		if(ap) System.out.println("APPROVED");
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int num;
		boolean ap = true;
		while(sc.hasNext()) {
			num = sc.nextInt();
			if(num%2!=0) continue;
			if(num%3!=0 && num%5!=0) {
				System.out.println("DENIED");
				ap = false;
				break;
			}
		}
		if(ap) System.out.println("APPROVED");
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int num;
		boolean ap = true;
		while(sc.hasNext()) {
			num = sc.nextInt();
			if(num%2!=0) continue;
			if(num%3!=0 && num%5!=0) {
				System.out.println("DENIED");
				ap = false;
				break;
			}
		}
		if(ap) System.out.println("APPROVED");
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int num;
		boolean ap = true;
		while(sc.hasNext()) {
			num = sc.nextInt();
			if(num%2!=0) continue;
			if(num%3!=0 && num%5!=0) {
				System.out.println("DENIED");
				ap = false;
				break;
			}
		}
		if(ap) System.out.println("APPROVED");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int num; num boolean ap = true; ap true while(sc.hasNext()) {
			num = sc.nextInt();
			if(num%2!=0) continue;
			if(num%3!=0 && num%5!=0) {
				System.out.println("DENIED");
				ap = false;
				break;
			}
		} sc.hasNext() sc.hasNext sc {
			num = sc.nextInt();
			if(num%2!=0) continue;
			if(num%3!=0 && num%5!=0) {
				System.out.println("DENIED");
				ap = false;
				break;
			}
		} num = sc.nextInt() num sc.nextInt() sc.nextInt sc if(num%2!=0) continue; num%2!=0 num%2 num 2 0 continue; if(num%3!=0 && num%5!=0) {
				System.out.println("DENIED");
				ap = false;
				break;
			} num%3!=0 && num%5!=0 num%3!=0 num%3 num 3 0 num%5!=0 num%5 num 5 0 {
				System.out.println("DENIED");
				ap = false;
				break;
			} System.out.println("DENIED") System.out.println System.out System System.out "DENIED" ap = false ap false break; if(ap) System.out.println("APPROVED"); ap System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int num;
		boolean ap = true;
		while(sc.hasNext()) {
			num = sc.nextInt();
			if(num%2!=0) continue;
			if(num%3!=0 && num%5!=0) {
				System.out.println("DENIED");
				ap = false;
				break;
			}
		}
		if(ap) System.out.println("APPROVED");
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int num;
		boolean ap = true;
		while(sc.hasNext()) {
			num = sc.nextInt();
			if(num%2!=0) continue;
			if(num%3!=0 && num%5!=0) {
				System.out.println("DENIED");
				ap = false;
				break;
			}
		}
		if(ap) System.out.println("APPROVED");
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int num;
		boolean ap = true;
		while(sc.hasNext()) {
			num = sc.nextInt();
			if(num%2!=0) continue;
			if(num%3!=0 && num%5!=0) {
				System.out.println("DENIED");
				ap = false;
				break;
			}
		}
		if(ap) System.out.println("APPROVED");
	}

}
