import java.util.*;

class Main {
	Scanner sc;
	int N;
	
	private void calc() {
		sc = new Scanner(System.in);
		N = sc.nextInt();
		boolean approved = true;
		for (int i = 0; i < N; i++) {
			int A = sc.nextInt();
			if (!approved) continue;
			if (A%2 != 0) continue;
			if (A%2 == 0 && (A%3 == 0 || A%5 == 0)) continue;
			approved = false;
		}
		System.out.println(approved?"APPROVED":"DENIED");
	}

	public static void main(String[] args) {
		new Main().calc();
	}
} import java.util.*; util.* java class Main {
	Scanner sc;
	int N;
	
	private void calc() {
		sc = new Scanner(System.in);
		N = sc.nextInt();
		boolean approved = true;
		for (int i = 0; i < N; i++) {
			int A = sc.nextInt();
			if (!approved) continue;
			if (A%2 != 0) continue;
			if (A%2 == 0 && (A%3 == 0 || A%5 == 0)) continue;
			approved = false;
		}
		System.out.println(approved?"APPROVED":"DENIED");
	}

	public static void main(String[] args) {
		new Main().calc();
	}
} Main Scanner sc; sc int N; N private void calc() {
		sc = new Scanner(System.in);
		N = sc.nextInt();
		boolean approved = true;
		for (int i = 0; i < N; i++) {
			int A = sc.nextInt();
			if (!approved) continue;
			if (A%2 != 0) continue;
			if (A%2 == 0 && (A%3 == 0 || A%5 == 0)) continue;
			approved = false;
		}
		System.out.println(approved?"APPROVED":"DENIED");
	} calc {
		sc = new Scanner(System.in);
		N = sc.nextInt();
		boolean approved = true;
		for (int i = 0; i < N; i++) {
			int A = sc.nextInt();
			if (!approved) continue;
			if (A%2 != 0) continue;
			if (A%2 == 0 && (A%3 == 0 || A%5 == 0)) continue;
			approved = false;
		}
		System.out.println(approved?"APPROVED":"DENIED");
	} sc = new Scanner(System.in) sc new Scanner(System.in) N = sc.nextInt() N sc.nextInt() sc.nextInt sc boolean approved = true; approved true for (int i = 0; i < N; i++) {
			int A = sc.nextInt();
			if (!approved) continue;
			if (A%2 != 0) continue;
			if (A%2 == 0 && (A%3 == 0 || A%5 == 0)) continue;
			approved = false;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int A = sc.nextInt();
			if (!approved) continue;
			if (A%2 != 0) continue;
			if (A%2 == 0 && (A%3 == 0 || A%5 == 0)) continue;
			approved = false;
		} {
			int A = sc.nextInt();
			if (!approved) continue;
			if (A%2 != 0) continue;
			if (A%2 == 0 && (A%3 == 0 || A%5 == 0)) continue;
			approved = false;
		} int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc if (!approved) continue; !approved approved continue; if (A%2 != 0) continue; A%2 != 0 A%2 A 2 0 continue; if (A%2 == 0 && (A%3 == 0 || A%5 == 0)) continue; A%2 == 0 && (A%3 == 0 || A%5 == 0) A%2 == 0 A%2 A 2 0 (A%3 == 0 || A%5 == 0) A%3 == 0 A%3 A 3 0 A%5 == 0 A%5 A 5 0 continue; approved = false approved false System.out.println(approved?"APPROVED":"DENIED") System.out.println System.out System System.out approved?"APPROVED":"DENIED" approved "APPROVED" "DENIED" public static void main(String[] args) {
		new Main().calc();
	} main {
		new Main().calc();
	} new Main().calc() new Main().calc new Main() String[] args args
import java.util.*;

class Main {
	Scanner sc;
	int N;
	
	private void calc() {
		sc = new Scanner(System.in);
		N = sc.nextInt();
		boolean approved = true;
		for (int i = 0; i < N; i++) {
			int A = sc.nextInt();
			if (!approved) continue;
			if (A%2 != 0) continue;
			if (A%2 == 0 && (A%3 == 0 || A%5 == 0)) continue;
			approved = false;
		}
		System.out.println(approved?"APPROVED":"DENIED");
	}

	public static void main(String[] args) {
		new Main().calc();
	}
}
