import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		// abc155_a();
		abc155_b();

	}

	static void abc155_a() {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		int n2 = sc.nextInt();
		int n3 = sc.nextInt();

		if ((n1 == n2 && n2 == n3) || (n1 != n2 && n1 != n3 && n2 != n3)) {

			System.out.println("No");
		} else {
			System.out.println("Yes");
		}

	}

	static void abc155_b() {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i <= n1; i++) {
			int n = sc.nextInt();
			if (n % 2 == 0) {
				if (!(n % 3 == 0 || n % 5 == 0)) {
					flg = true;
					break;
				}
			}
		}

		if (flg) {
			System.out.println("DENIED");
		} else {
			System.out.println("APPROVED");
		}

		//

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		// abc155_a();
		abc155_b();

	}

	static void abc155_a() {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		int n2 = sc.nextInt();
		int n3 = sc.nextInt();

		if ((n1 == n2 && n2 == n3) || (n1 != n2 && n1 != n3 && n2 != n3)) {

			System.out.println("No");
		} else {
			System.out.println("Yes");
		}

	}

	static void abc155_b() {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i <= n1; i++) {
			int n = sc.nextInt();
			if (n % 2 == 0) {
				if (!(n % 3 == 0 || n % 5 == 0)) {
					flg = true;
					break;
				}
			}
		}

		if (flg) {
			System.out.println("DENIED");
		} else {
			System.out.println("APPROVED");
		}

		//

	}
} Main public static void main(String[] args) {

		// abc155_a();
		abc155_b();

	} main {

		// abc155_a();
		abc155_b();

	} abc155_b() abc155_b String[] args args static void abc155_a() {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		int n2 = sc.nextInt();
		int n3 = sc.nextInt();

		if ((n1 == n2 && n2 == n3) || (n1 != n2 && n1 != n3 && n2 != n3)) {

			System.out.println("No");
		} else {
			System.out.println("Yes");
		}

	} abc155_a {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		int n2 = sc.nextInt();
		int n3 = sc.nextInt();

		if ((n1 == n2 && n2 == n3) || (n1 != n2 && n1 != n3 && n2 != n3)) {

			System.out.println("No");
		} else {
			System.out.println("Yes");
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n1 = sc.nextInt(); n1 sc.nextInt() sc.nextInt sc int n2 = sc.nextInt(); n2 sc.nextInt() sc.nextInt sc int n3 = sc.nextInt(); n3 sc.nextInt() sc.nextInt sc if ((n1 == n2 && n2 == n3) || (n1 != n2 && n1 != n3 && n2 != n3)) {

			System.out.println("No");
		} else {
			System.out.println("Yes");
		} (n1 == n2 && n2 == n3) || (n1 != n2 && n1 != n3 && n2 != n3) (n1 == n2 && n2 == n3) n1 == n2 n1 n2 n2 == n3 n2 n3 (n1 != n2 && n1 != n3 && n2 != n3) n1 != n2 && n1 != n3 && n2 != n3 n1 != n2 n1 n2 n1 != n3 n1 n3 n2 != n3 n2 n3 {

			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" static void abc155_b() {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i <= n1; i++) {
			int n = sc.nextInt();
			if (n % 2 == 0) {
				if (!(n % 3 == 0 || n % 5 == 0)) {
					flg = true;
					break;
				}
			}
		}

		if (flg) {
			System.out.println("DENIED");
		} else {
			System.out.println("APPROVED");
		}

		//

	} abc155_b {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i <= n1; i++) {
			int n = sc.nextInt();
			if (n % 2 == 0) {
				if (!(n % 3 == 0 || n % 5 == 0)) {
					flg = true;
					break;
				}
			}
		}

		if (flg) {
			System.out.println("DENIED");
		} else {
			System.out.println("APPROVED");
		}

		//

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n1 = sc.nextInt(); n1 sc.nextInt() sc.nextInt sc boolean flg = false; flg false for (int i = 1; i <= n1; i++) {
			int n = sc.nextInt();
			if (n % 2 == 0) {
				if (!(n % 3 == 0 || n % 5 == 0)) {
					flg = true;
					break;
				}
			}
		} int i = 1; int i = 1; i 1 i <= n1 i n1 i++ i++ i {
			int n = sc.nextInt();
			if (n % 2 == 0) {
				if (!(n % 3 == 0 || n % 5 == 0)) {
					flg = true;
					break;
				}
			}
		} {
			int n = sc.nextInt();
			if (n % 2 == 0) {
				if (!(n % 3 == 0 || n % 5 == 0)) {
					flg = true;
					break;
				}
			}
		} int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc if (n % 2 == 0) {
				if (!(n % 3 == 0 || n % 5 == 0)) {
					flg = true;
					break;
				}
			} n % 2 == 0 n % 2 n 2 0 {
				if (!(n % 3 == 0 || n % 5 == 0)) {
					flg = true;
					break;
				}
			} if (!(n % 3 == 0 || n % 5 == 0)) {
					flg = true;
					break;
				} !(n % 3 == 0 || n % 5 == 0) (n % 3 == 0 || n % 5 == 0) n % 3 == 0 n % 3 n 3 0 n % 5 == 0 n % 5 n 5 0 {
					flg = true;
					break;
				} flg = true flg true break; if (flg) {
			System.out.println("DENIED");
		} else {
			System.out.println("APPROVED");
		} flg {
			System.out.println("DENIED");
		} System.out.println("DENIED") System.out.println System.out System System.out "DENIED" {
			System.out.println("APPROVED");
		} System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" public class Main {
	public static void main(String[] args) {

		// abc155_a();
		abc155_b();

	}

	static void abc155_a() {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		int n2 = sc.nextInt();
		int n3 = sc.nextInt();

		if ((n1 == n2 && n2 == n3) || (n1 != n2 && n1 != n3 && n2 != n3)) {

			System.out.println("No");
		} else {
			System.out.println("Yes");
		}

	}

	static void abc155_b() {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i <= n1; i++) {
			int n = sc.nextInt();
			if (n % 2 == 0) {
				if (!(n % 3 == 0 || n % 5 == 0)) {
					flg = true;
					break;
				}
			}
		}

		if (flg) {
			System.out.println("DENIED");
		} else {
			System.out.println("APPROVED");
		}

		//

	}
} public class Main {
	public static void main(String[] args) {

		// abc155_a();
		abc155_b();

	}

	static void abc155_a() {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		int n2 = sc.nextInt();
		int n3 = sc.nextInt();

		if ((n1 == n2 && n2 == n3) || (n1 != n2 && n1 != n3 && n2 != n3)) {

			System.out.println("No");
		} else {
			System.out.println("Yes");
		}

	}

	static void abc155_b() {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i <= n1; i++) {
			int n = sc.nextInt();
			if (n % 2 == 0) {
				if (!(n % 3 == 0 || n % 5 == 0)) {
					flg = true;
					break;
				}
			}
		}

		if (flg) {
			System.out.println("DENIED");
		} else {
			System.out.println("APPROVED");
		}

		//

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		// abc155_a();
		abc155_b();

	}

	static void abc155_a() {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		int n2 = sc.nextInt();
		int n3 = sc.nextInt();

		if ((n1 == n2 && n2 == n3) || (n1 != n2 && n1 != n3 && n2 != n3)) {

			System.out.println("No");
		} else {
			System.out.println("Yes");
		}

	}

	static void abc155_b() {

		Scanner sc = new Scanner(System.in);
		// 数値
		int n1 = sc.nextInt();
		boolean flg = false;
		for (int i = 1; i <= n1; i++) {
			int n = sc.nextInt();
			if (n % 2 == 0) {
				if (!(n % 3 == 0 || n % 5 == 0)) {
					flg = true;
					break;
				}
			}
		}

		if (flg) {
			System.out.println("DENIED");
		} else {
			System.out.println("APPROVED");
		}

		//

	}
}
