import java.util.*;
import java.io.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean approved = true;
		for (int i = 0; i < n; i++) {
			int x = sc.nextInt();
			if ((x & 1) == 0 && (x % 3 != 0 && x % 5 != 0)) 
				approved = false;
		}
		if (approved) System.out.println("APPROVED");
		else System.out.println("DENIED");
	}
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean approved = true;
		for (int i = 0; i < n; i++) {
			int x = sc.nextInt();
			if ((x & 1) == 0 && (x % 3 != 0 && x % 5 != 0)) 
				approved = false;
		}
		if (approved) System.out.println("APPROVED");
		else System.out.println("DENIED");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean approved = true;
		for (int i = 0; i < n; i++) {
			int x = sc.nextInt();
			if ((x & 1) == 0 && (x % 3 != 0 && x % 5 != 0)) 
				approved = false;
		}
		if (approved) System.out.println("APPROVED");
		else System.out.println("DENIED");
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean approved = true;
		for (int i = 0; i < n; i++) {
			int x = sc.nextInt();
			if ((x & 1) == 0 && (x % 3 != 0 && x % 5 != 0)) 
				approved = false;
		}
		if (approved) System.out.println("APPROVED");
		else System.out.println("DENIED");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc boolean approved = true; approved true for (int i = 0; i < n; i++) {
			int x = sc.nextInt();
			if ((x & 1) == 0 && (x % 3 != 0 && x % 5 != 0)) 
				approved = false;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int x = sc.nextInt();
			if ((x & 1) == 0 && (x % 3 != 0 && x % 5 != 0)) 
				approved = false;
		} {
			int x = sc.nextInt();
			if ((x & 1) == 0 && (x % 3 != 0 && x % 5 != 0)) 
				approved = false;
		} int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc if ((x & 1) == 0 && (x % 3 != 0 && x % 5 != 0)) 
				approved = false; (x & 1) == 0 && (x % 3 != 0 && x % 5 != 0) (x & 1) == 0 (x & 1) x 1 0 (x % 3 != 0 && x % 5 != 0) x % 3 != 0 x % 3 x 3 0 x % 5 != 0 x % 5 x 5 0 approved = false approved false if (approved) System.out.println("APPROVED");
		else System.out.println("DENIED"); approved System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" System.out.println("DENIED") System.out.println System.out System System.out "DENIED" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean approved = true;
		for (int i = 0; i < n; i++) {
			int x = sc.nextInt();
			if ((x & 1) == 0 && (x % 3 != 0 && x % 5 != 0)) 
				approved = false;
		}
		if (approved) System.out.println("APPROVED");
		else System.out.println("DENIED");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean approved = true;
		for (int i = 0; i < n; i++) {
			int x = sc.nextInt();
			if ((x & 1) == 0 && (x % 3 != 0 && x % 5 != 0)) 
				approved = false;
		}
		if (approved) System.out.println("APPROVED");
		else System.out.println("DENIED");
	}
} Main
import java.util.*;
import java.io.*;

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