import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] list = new int[N];
		for (int i = 0; i < N; i++) {
			list[i]=sc.nextInt();
		}
		int J = 0;

		for(int i = 0; i < N; i++) {
			if(list[i]%2==0) {
				if(list[i]%3==0||list[i]%5==0) {
				}else {
					J = -1;
				}
			}else {
			}
		}

		if(J==0) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] list = new int[N];
		for (int i = 0; i < N; i++) {
			list[i]=sc.nextInt();
		}
		int J = 0;

		for(int i = 0; i < N; i++) {
			if(list[i]%2==0) {
				if(list[i]%3==0||list[i]%5==0) {
				}else {
					J = -1;
				}
			}else {
			}
		}

		if(J==0) {
			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();
		int[] list = new int[N];
		for (int i = 0; i < N; i++) {
			list[i]=sc.nextInt();
		}
		int J = 0;

		for(int i = 0; i < N; i++) {
			if(list[i]%2==0) {
				if(list[i]%3==0||list[i]%5==0) {
				}else {
					J = -1;
				}
			}else {
			}
		}

		if(J==0) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] list = new int[N];
		for (int i = 0; i < N; i++) {
			list[i]=sc.nextInt();
		}
		int J = 0;

		for(int i = 0; i < N; i++) {
			if(list[i]%2==0) {
				if(list[i]%3==0||list[i]%5==0) {
				}else {
					J = -1;
				}
			}else {
			}
		}

		if(J==0) {
			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 int[] list = new int[N]; list new int[N] N for (int i = 0; i < N; i++) {
			list[i]=sc.nextInt();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			list[i]=sc.nextInt();
		} {
			list[i]=sc.nextInt();
		} list[i]=sc.nextInt() list[i] list i sc.nextInt() sc.nextInt sc int J = 0; J 0 for(int i = 0; i < N; i++) {
			if(list[i]%2==0) {
				if(list[i]%3==0||list[i]%5==0) {
				}else {
					J = -1;
				}
			}else {
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if(list[i]%2==0) {
				if(list[i]%3==0||list[i]%5==0) {
				}else {
					J = -1;
				}
			}else {
			}
		} {
			if(list[i]%2==0) {
				if(list[i]%3==0||list[i]%5==0) {
				}else {
					J = -1;
				}
			}else {
			}
		} if(list[i]%2==0) {
				if(list[i]%3==0||list[i]%5==0) {
				}else {
					J = -1;
				}
			}else {
			} list[i]%2==0 list[i]%2 list[i] list i 2 0 {
				if(list[i]%3==0||list[i]%5==0) {
				}else {
					J = -1;
				}
			} if(list[i]%3==0||list[i]%5==0) {
				}else {
					J = -1;
				} list[i]%3==0||list[i]%5==0 list[i]%3==0 list[i]%3 list[i] list i 3 0 list[i]%5==0 list[i]%5 list[i] list i 5 0 {
				} {
					J = -1;
				} J = -1 J -1 1 {
			} if(J==0) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		} J==0 J 0 {
			System.out.println("APPROVED");
		} System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" {
			System.out.println("DENIED");
		} 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();
		int[] list = new int[N];
		for (int i = 0; i < N; i++) {
			list[i]=sc.nextInt();
		}
		int J = 0;

		for(int i = 0; i < N; i++) {
			if(list[i]%2==0) {
				if(list[i]%3==0||list[i]%5==0) {
				}else {
					J = -1;
				}
			}else {
			}
		}

		if(J==0) {
			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();
		int[] list = new int[N];
		for (int i = 0; i < N; i++) {
			list[i]=sc.nextInt();
		}
		int J = 0;

		for(int i = 0; i < N; i++) {
			if(list[i]%2==0) {
				if(list[i]%3==0||list[i]%5==0) {
				}else {
					J = -1;
				}
			}else {
			}
		}

		if(J==0) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] list = new int[N];
		for (int i = 0; i < N; i++) {
			list[i]=sc.nextInt();
		}
		int J = 0;

		for(int i = 0; i < N; i++) {
			if(list[i]%2==0) {
				if(list[i]%3==0||list[i]%5==0) {
				}else {
					J = -1;
				}
			}else {
			}
		}

		if(J==0) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	}
}