import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String b = "APPROVED";
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a[i] = j;
		}
		for (int e : a) {
			if (e % 2 == 0) {
				if (e % 3 != 0 && e % 5 != 0) {
					b = "DENIED";
					break;
				}
			}
		}
		System.out.println(b);

		kb.close();
	}

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

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String b = "APPROVED";
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a[i] = j;
		}
		for (int e : a) {
			if (e % 2 == 0) {
				if (e % 3 != 0 && e % 5 != 0) {
					b = "DENIED";
					break;
				}
			}
		}
		System.out.println(b);

		kb.close();
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String b = "APPROVED";
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a[i] = j;
		}
		for (int e : a) {
			if (e % 2 == 0) {
				if (e % 3 != 0 && e % 5 != 0) {
					b = "DENIED";
					break;
				}
			}
		}
		System.out.println(b);

		kb.close();
	} main {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String b = "APPROVED";
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a[i] = j;
		}
		for (int e : a) {
			if (e % 2 == 0) {
				if (e % 3 != 0 && e % 5 != 0) {
					b = "DENIED";
					break;
				}
			}
		}
		System.out.println(b);

		kb.close();
	} Scanner kb = new Scanner(System.in); kb new Scanner(System.in) int n = kb.nextInt(); n kb.nextInt() kb.nextInt kb String b = "APPROVED"; b "APPROVED" int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a[i] = j;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int j = kb.nextInt();
			a[i] = j;
		} {
			int j = kb.nextInt();
			a[i] = j;
		} int j = kb.nextInt(); j kb.nextInt() kb.nextInt kb a[i] = j a[i] a i j for (int e : a) {
			if (e % 2 == 0) {
				if (e % 3 != 0 && e % 5 != 0) {
					b = "DENIED";
					break;
				}
			}
		} int e a {
			if (e % 2 == 0) {
				if (e % 3 != 0 && e % 5 != 0) {
					b = "DENIED";
					break;
				}
			}
		} {
			if (e % 2 == 0) {
				if (e % 3 != 0 && e % 5 != 0) {
					b = "DENIED";
					break;
				}
			}
		} if (e % 2 == 0) {
				if (e % 3 != 0 && e % 5 != 0) {
					b = "DENIED";
					break;
				}
			} e % 2 == 0 e % 2 e 2 0 {
				if (e % 3 != 0 && e % 5 != 0) {
					b = "DENIED";
					break;
				}
			} if (e % 3 != 0 && e % 5 != 0) {
					b = "DENIED";
					break;
				} e % 3 != 0 && e % 5 != 0 e % 3 != 0 e % 3 e 3 0 e % 5 != 0 e % 5 e 5 0 {
					b = "DENIED";
					break;
				} b = "DENIED" b "DENIED" break; System.out.println(b) System.out.println System.out System System.out b kb.close() kb.close kb String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String b = "APPROVED";
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a[i] = j;
		}
		for (int e : a) {
			if (e % 2 == 0) {
				if (e % 3 != 0 && e % 5 != 0) {
					b = "DENIED";
					break;
				}
			}
		}
		System.out.println(b);

		kb.close();
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String b = "APPROVED";
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a[i] = j;
		}
		for (int e : a) {
			if (e % 2 == 0) {
				if (e % 3 != 0 && e % 5 != 0) {
					b = "DENIED";
					break;
				}
			}
		}
		System.out.println(b);

		kb.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String b = "APPROVED";
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a[i] = j;
		}
		for (int e : a) {
			if (e % 2 == 0) {
				if (e % 3 != 0 && e % 5 != 0) {
					b = "DENIED";
					break;
				}
			}
		}
		System.out.println(b);

		kb.close();
	}

}
