import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// 自分の得意な言語で
		// Let's チャレンジ！！
		// APPROVED
		// DENIED

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		String re = "APPROVED";

		int chk = 0;
		for (int i = 0; i < n; i++) {
			chk = sc.nextInt();
			if (chk % 2 == 0) {
				if (chk % 3 == 0 || chk % 5 == 0) {
					// no action
				} else {
					re = "DENIED";
				}
			}
		}

		System.out.println(re);
	}

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

	public static void main(String[] args) {
		// 自分の得意な言語で
		// Let's チャレンジ！！
		// APPROVED
		// DENIED

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		String re = "APPROVED";

		int chk = 0;
		for (int i = 0; i < n; i++) {
			chk = sc.nextInt();
			if (chk % 2 == 0) {
				if (chk % 3 == 0 || chk % 5 == 0) {
					// no action
				} else {
					re = "DENIED";
				}
			}
		}

		System.out.println(re);
	}

} Main public static void main(String[] args) {
		// 自分の得意な言語で
		// Let's チャレンジ！！
		// APPROVED
		// DENIED

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		String re = "APPROVED";

		int chk = 0;
		for (int i = 0; i < n; i++) {
			chk = sc.nextInt();
			if (chk % 2 == 0) {
				if (chk % 3 == 0 || chk % 5 == 0) {
					// no action
				} else {
					re = "DENIED";
				}
			}
		}

		System.out.println(re);
	} main {
		// 自分の得意な言語で
		// Let's チャレンジ！！
		// APPROVED
		// DENIED

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		String re = "APPROVED";

		int chk = 0;
		for (int i = 0; i < n; i++) {
			chk = sc.nextInt();
			if (chk % 2 == 0) {
				if (chk % 3 == 0 || chk % 5 == 0) {
					// no action
				} else {
					re = "DENIED";
				}
			}
		}

		System.out.println(re);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String re = "APPROVED"; re "APPROVED" int chk = 0; chk 0 for (int i = 0; i < n; i++) {
			chk = sc.nextInt();
			if (chk % 2 == 0) {
				if (chk % 3 == 0 || chk % 5 == 0) {
					// no action
				} else {
					re = "DENIED";
				}
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			chk = sc.nextInt();
			if (chk % 2 == 0) {
				if (chk % 3 == 0 || chk % 5 == 0) {
					// no action
				} else {
					re = "DENIED";
				}
			}
		} {
			chk = sc.nextInt();
			if (chk % 2 == 0) {
				if (chk % 3 == 0 || chk % 5 == 0) {
					// no action
				} else {
					re = "DENIED";
				}
			}
		} chk = sc.nextInt() chk sc.nextInt() sc.nextInt sc if (chk % 2 == 0) {
				if (chk % 3 == 0 || chk % 5 == 0) {
					// no action
				} else {
					re = "DENIED";
				}
			} chk % 2 == 0 chk % 2 chk 2 0 {
				if (chk % 3 == 0 || chk % 5 == 0) {
					// no action
				} else {
					re = "DENIED";
				}
			} if (chk % 3 == 0 || chk % 5 == 0) {
					// no action
				} else {
					re = "DENIED";
				} chk % 3 == 0 || chk % 5 == 0 chk % 3 == 0 chk % 3 chk 3 0 chk % 5 == 0 chk % 5 chk 5 0 {
					// no action
				} {
					re = "DENIED";
				} re = "DENIED" re "DENIED" System.out.println(re) System.out.println System.out System System.out re String[] args args public class Main {

	public static void main(String[] args) {
		// 自分の得意な言語で
		// Let's チャレンジ！！
		// APPROVED
		// DENIED

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		String re = "APPROVED";

		int chk = 0;
		for (int i = 0; i < n; i++) {
			chk = sc.nextInt();
			if (chk % 2 == 0) {
				if (chk % 3 == 0 || chk % 5 == 0) {
					// no action
				} else {
					re = "DENIED";
				}
			}
		}

		System.out.println(re);
	}

} public class Main {

	public static void main(String[] args) {
		// 自分の得意な言語で
		// Let's チャレンジ！！
		// APPROVED
		// DENIED

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		String re = "APPROVED";

		int chk = 0;
		for (int i = 0; i < n; i++) {
			chk = sc.nextInt();
			if (chk % 2 == 0) {
				if (chk % 3 == 0 || chk % 5 == 0) {
					// no action
				} else {
					re = "DENIED";
				}
			}
		}

		System.out.println(re);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// 自分の得意な言語で
		// Let's チャレンジ！！
		// APPROVED
		// DENIED

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		String re = "APPROVED";

		int chk = 0;
		for (int i = 0; i < n; i++) {
			chk = sc.nextInt();
			if (chk % 2 == 0) {
				if (chk % 3 == 0 || chk % 5 == 0) {
					// no action
				} else {
					re = "DENIED";
				}
			}
		}

		System.out.println(re);
	}

}