import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();
		boolean check = true;
		for(int i = 0; i < N; i++) {
			int num = list.get(i);
			if(num % 2 == 0) {
				if(num % 3 != 0 && num % 5 != 0) {
					check = false;
					break;
				}else {
					continue;
				}
			}else {
				continue;
			}
		}
		if(check) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();
		boolean check = true;
		for(int i = 0; i < N; i++) {
			int num = list.get(i);
			if(num % 2 == 0) {
				if(num % 3 != 0 && num % 5 != 0) {
					check = false;
					break;
				}else {
					continue;
				}
			}else {
				continue;
			}
		}
		if(check) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();
		boolean check = true;
		for(int i = 0; i < N; i++) {
			int num = list.get(i);
			if(num % 2 == 0) {
				if(num % 3 != 0 && num % 5 != 0) {
					check = false;
					break;
				}else {
					continue;
				}
			}else {
				continue;
			}
		}
		if(check) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();
		boolean check = true;
		for(int i = 0; i < N; i++) {
			int num = list.get(i);
			if(num % 2 == 0) {
				if(num % 3 != 0 && num % 5 != 0) {
					check = false;
					break;
				}else {
					continue;
				}
			}else {
				continue;
			}
		}
		if(check) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc ArrayList<Integer> list = new ArrayList<>(); list new ArrayList<>() for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			list.add(Integer.parseInt(sc.next()));
		} {
			list.add(Integer.parseInt(sc.next()));
		} list.add(Integer.parseInt(sc.next())) list.add list Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc boolean check = true; check true for(int i = 0; i < N; i++) {
			int num = list.get(i);
			if(num % 2 == 0) {
				if(num % 3 != 0 && num % 5 != 0) {
					check = false;
					break;
				}else {
					continue;
				}
			}else {
				continue;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int num = list.get(i);
			if(num % 2 == 0) {
				if(num % 3 != 0 && num % 5 != 0) {
					check = false;
					break;
				}else {
					continue;
				}
			}else {
				continue;
			}
		} {
			int num = list.get(i);
			if(num % 2 == 0) {
				if(num % 3 != 0 && num % 5 != 0) {
					check = false;
					break;
				}else {
					continue;
				}
			}else {
				continue;
			}
		} int num = list.get(i); num list.get(i) list.get list i if(num % 2 == 0) {
				if(num % 3 != 0 && num % 5 != 0) {
					check = false;
					break;
				}else {
					continue;
				}
			}else {
				continue;
			} num % 2 == 0 num % 2 num 2 0 {
				if(num % 3 != 0 && num % 5 != 0) {
					check = false;
					break;
				}else {
					continue;
				}
			} if(num % 3 != 0 && num % 5 != 0) {
					check = false;
					break;
				}else {
					continue;
				} num % 3 != 0 && num % 5 != 0 num % 3 != 0 num % 3 num 3 0 num % 5 != 0 num % 5 num 5 0 {
					check = false;
					break;
				} check = false check false break; {
					continue;
				} continue; {
				continue;
			} continue; if(check) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		} check {
			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 = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();
		boolean check = true;
		for(int i = 0; i < N; i++) {
			int num = list.get(i);
			if(num % 2 == 0) {
				if(num % 3 != 0 && num % 5 != 0) {
					check = false;
					break;
				}else {
					continue;
				}
			}else {
				continue;
			}
		}
		if(check) {
			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 = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();
		boolean check = true;
		for(int i = 0; i < N; i++) {
			int num = list.get(i);
			if(num % 2 == 0) {
				if(num % 3 != 0 && num % 5 != 0) {
					check = false;
					break;
				}else {
					continue;
				}
			}else {
				continue;
			}
		}
		if(check) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	}

} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();
		boolean check = true;
		for(int i = 0; i < N; i++) {
			int num = list.get(i);
			if(num % 2 == 0) {
				if(num % 3 != 0 && num % 5 != 0) {
					check = false;
					break;
				}else {
					continue;
				}
			}else {
				continue;
			}
		}
		if(check) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
	}

}