import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = Integer.parseInt(scanner.nextLine());
		String line = scanner.nextLine();
		String[] splits = line.split(" ");
		int[] a = new int[splits.length];
		Boolean isOK = true;
		for(int i = 0; i < splits.length; i++){
			a[i] = Integer.parseInt(splits[i]);
			if(a[i] % 2 == 0 && (a[i]%3 != 0 && a[i] % 5 != 0)){
				isOK = false;
				break;
			}else{

			}
		}
		String result = isOK ? "APPROVED" : "DENIED";

		System.out.println(result);
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = Integer.parseInt(scanner.nextLine());
		String line = scanner.nextLine();
		String[] splits = line.split(" ");
		int[] a = new int[splits.length];
		Boolean isOK = true;
		for(int i = 0; i < splits.length; i++){
			a[i] = Integer.parseInt(splits[i]);
			if(a[i] % 2 == 0 && (a[i]%3 != 0 && a[i] % 5 != 0)){
				isOK = false;
				break;
			}else{

			}
		}
		String result = isOK ? "APPROVED" : "DENIED";

		System.out.println(result);
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = Integer.parseInt(scanner.nextLine());
		String line = scanner.nextLine();
		String[] splits = line.split(" ");
		int[] a = new int[splits.length];
		Boolean isOK = true;
		for(int i = 0; i < splits.length; i++){
			a[i] = Integer.parseInt(splits[i]);
			if(a[i] % 2 == 0 && (a[i]%3 != 0 && a[i] % 5 != 0)){
				isOK = false;
				break;
			}else{

			}
		}
		String result = isOK ? "APPROVED" : "DENIED";

		System.out.println(result);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = Integer.parseInt(scanner.nextLine());
		String line = scanner.nextLine();
		String[] splits = line.split(" ");
		int[] a = new int[splits.length];
		Boolean isOK = true;
		for(int i = 0; i < splits.length; i++){
			a[i] = Integer.parseInt(splits[i]);
			if(a[i] % 2 == 0 && (a[i]%3 != 0 && a[i] % 5 != 0)){
				isOK = false;
				break;
			}else{

			}
		}
		String result = isOK ? "APPROVED" : "DENIED";

		System.out.println(result);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = Integer.parseInt(scanner.nextLine()); n Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner String line = scanner.nextLine(); line scanner.nextLine() scanner.nextLine scanner String[] splits = line.split(" "); splits line.split(" ") line.split line " " int[] a = new int[splits.length]; a new int[splits.length] splits.length splits splits.length Boolean isOK = true; isOK true for(int i = 0; i < splits.length; i++){
			a[i] = Integer.parseInt(splits[i]);
			if(a[i] % 2 == 0 && (a[i]%3 != 0 && a[i] % 5 != 0)){
				isOK = false;
				break;
			}else{

			}
		} int i = 0; int i = 0; i 0 i < splits.length i splits.length splits splits.length i++ i++ i {
			a[i] = Integer.parseInt(splits[i]);
			if(a[i] % 2 == 0 && (a[i]%3 != 0 && a[i] % 5 != 0)){
				isOK = false;
				break;
			}else{

			}
		} {
			a[i] = Integer.parseInt(splits[i]);
			if(a[i] % 2 == 0 && (a[i]%3 != 0 && a[i] % 5 != 0)){
				isOK = false;
				break;
			}else{

			}
		} a[i] = Integer.parseInt(splits[i]) a[i] a i Integer.parseInt(splits[i]) Integer.parseInt Integer splits[i] splits i if(a[i] % 2 == 0 && (a[i]%3 != 0 && a[i] % 5 != 0)){
				isOK = false;
				break;
			}else{

			} 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]%3 a[i] a i 3 0 a[i] % 5 != 0 a[i] % 5 a[i] a i 5 0 {
				isOK = false;
				break;
			} isOK = false isOK false break; {

			} String result = isOK ? "APPROVED" : "DENIED"; result isOK ? "APPROVED" : "DENIED" isOK "APPROVED" "DENIED" 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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = Integer.parseInt(scanner.nextLine());
		String line = scanner.nextLine();
		String[] splits = line.split(" ");
		int[] a = new int[splits.length];
		Boolean isOK = true;
		for(int i = 0; i < splits.length; i++){
			a[i] = Integer.parseInt(splits[i]);
			if(a[i] % 2 == 0 && (a[i]%3 != 0 && a[i] % 5 != 0)){
				isOK = false;
				break;
			}else{

			}
		}
		String result = isOK ? "APPROVED" : "DENIED";

		System.out.println(result);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = Integer.parseInt(scanner.nextLine());
		String line = scanner.nextLine();
		String[] splits = line.split(" ");
		int[] a = new int[splits.length];
		Boolean isOK = true;
		for(int i = 0; i < splits.length; i++){
			a[i] = Integer.parseInt(splits[i]);
			if(a[i] % 2 == 0 && (a[i]%3 != 0 && a[i] % 5 != 0)){
				isOK = false;
				break;
			}else{

			}
		}
		String result = isOK ? "APPROVED" : "DENIED";

		System.out.println(result);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = Integer.parseInt(scanner.nextLine());
		String line = scanner.nextLine();
		String[] splits = line.split(" ");
		int[] a = new int[splits.length];
		Boolean isOK = true;
		for(int i = 0; i < splits.length; i++){
			a[i] = Integer.parseInt(splits[i]);
			if(a[i] % 2 == 0 && (a[i]%3 != 0 && a[i] % 5 != 0)){
				isOK = false;
				break;
			}else{

			}
		}
		String result = isOK ? "APPROVED" : "DENIED";

		System.out.println(result);
	}

}
