

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int[] A = new int[N];

		for (int i = 0; i < N; i++) {
			A[i] = scan.nextInt();
		}

		String anser = "APPROVED";

		for (int i : A) {
			if (i % 2 == 0) {
				if (i % 3 != 0 && i % 5 != 0)
					anser = "DENIED";
			}
		}

		System.out.println(anser);
	}

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

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int[] A = new int[N];

		for (int i = 0; i < N; i++) {
			A[i] = scan.nextInt();
		}

		String anser = "APPROVED";

		for (int i : A) {
			if (i % 2 == 0) {
				if (i % 3 != 0 && i % 5 != 0)
					anser = "DENIED";
			}
		}

		System.out.println(anser);
	}

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

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int[] A = new int[N];

		for (int i = 0; i < N; i++) {
			A[i] = scan.nextInt();
		}

		String anser = "APPROVED";

		for (int i : A) {
			if (i % 2 == 0) {
				if (i % 3 != 0 && i % 5 != 0)
					anser = "DENIED";
			}
		}

		System.out.println(anser);
	} main {

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int[] A = new int[N];

		for (int i = 0; i < N; i++) {
			A[i] = scan.nextInt();
		}

		String anser = "APPROVED";

		for (int i : A) {
			if (i % 2 == 0) {
				if (i % 3 != 0 && i % 5 != 0)
					anser = "DENIED";
			}
		}

		System.out.println(anser);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int[] A = new int[N]; A new int[N] N for (int i = 0; i < N; i++) {
			A[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			A[i] = scan.nextInt();
		} {
			A[i] = scan.nextInt();
		} A[i] = scan.nextInt() A[i] A i scan.nextInt() scan.nextInt scan String anser = "APPROVED"; anser "APPROVED" for (int i : A) {
			if (i % 2 == 0) {
				if (i % 3 != 0 && i % 5 != 0)
					anser = "DENIED";
			}
		} int i A {
			if (i % 2 == 0) {
				if (i % 3 != 0 && i % 5 != 0)
					anser = "DENIED";
			}
		} {
			if (i % 2 == 0) {
				if (i % 3 != 0 && i % 5 != 0)
					anser = "DENIED";
			}
		} if (i % 2 == 0) {
				if (i % 3 != 0 && i % 5 != 0)
					anser = "DENIED";
			} i % 2 == 0 i % 2 i 2 0 {
				if (i % 3 != 0 && i % 5 != 0)
					anser = "DENIED";
			} if (i % 3 != 0 && i % 5 != 0)
					anser = "DENIED"; i % 3 != 0 && i % 5 != 0 i % 3 != 0 i % 3 i 3 0 i % 5 != 0 i % 5 i 5 0 anser = "DENIED" anser "DENIED" System.out.println(anser) System.out.println System.out System System.out anser String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int[] A = new int[N];

		for (int i = 0; i < N; i++) {
			A[i] = scan.nextInt();
		}

		String anser = "APPROVED";

		for (int i : A) {
			if (i % 2 == 0) {
				if (i % 3 != 0 && i % 5 != 0)
					anser = "DENIED";
			}
		}

		System.out.println(anser);
	}

} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int[] A = new int[N];

		for (int i = 0; i < N; i++) {
			A[i] = scan.nextInt();
		}

		String anser = "APPROVED";

		for (int i : A) {
			if (i % 2 == 0) {
				if (i % 3 != 0 && i % 5 != 0)
					anser = "DENIED";
			}
		}

		System.out.println(anser);
	}

} Main


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int[] A = new int[N];

		for (int i = 0; i < N; i++) {
			A[i] = scan.nextInt();
		}

		String anser = "APPROVED";

		for (int i : A) {
			if (i % 2 == 0) {
				if (i % 3 != 0 && i % 5 != 0)
					anser = "DENIED";
			}
		}

		System.out.println(anser);
	}

}
