import java.util.Scanner;
	public class Main {
	
		public static void main(String[] args) {
			solve();
		}
		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int array[] = new int[n];
			String res = "APPROVED";
			for(int i = 0;i<n;i++) {
				array[i] =sc.nextInt();
				if(array[i]%2==0&&!(array[i]%3==0||array[i]%5==0)) {
						res = "DENIED";
					}
				
			}
			System.out.println(res);
			sc.close();
		}	
	}
	 import java.util.Scanner; Scanner java.util public class Main {
	
		public static void main(String[] args) {
			solve();
		}
		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int array[] = new int[n];
			String res = "APPROVED";
			for(int i = 0;i<n;i++) {
				array[i] =sc.nextInt();
				if(array[i]%2==0&&!(array[i]%3==0||array[i]%5==0)) {
						res = "DENIED";
					}
				
			}
			System.out.println(res);
			sc.close();
		}	
	} Main public static void main(String[] args) {
			solve();
		} main {
			solve();
		} solve() solve String[] args args static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int array[] = new int[n];
			String res = "APPROVED";
			for(int i = 0;i<n;i++) {
				array[i] =sc.nextInt();
				if(array[i]%2==0&&!(array[i]%3==0||array[i]%5==0)) {
						res = "DENIED";
					}
				
			}
			System.out.println(res);
			sc.close();
		} solve {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int array[] = new int[n];
			String res = "APPROVED";
			for(int i = 0;i<n;i++) {
				array[i] =sc.nextInt();
				if(array[i]%2==0&&!(array[i]%3==0||array[i]%5==0)) {
						res = "DENIED";
					}
				
			}
			System.out.println(res);
			sc.close();
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int array[] = new int[n]; array new int[n] n String res = "APPROVED"; res "APPROVED" for(int i = 0;i<n;i++) {
				array[i] =sc.nextInt();
				if(array[i]%2==0&&!(array[i]%3==0||array[i]%5==0)) {
						res = "DENIED";
					}
				
			} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
				array[i] =sc.nextInt();
				if(array[i]%2==0&&!(array[i]%3==0||array[i]%5==0)) {
						res = "DENIED";
					}
				
			} {
				array[i] =sc.nextInt();
				if(array[i]%2==0&&!(array[i]%3==0||array[i]%5==0)) {
						res = "DENIED";
					}
				
			} array[i] =sc.nextInt() array[i] array i sc.nextInt() sc.nextInt sc if(array[i]%2==0&&!(array[i]%3==0||array[i]%5==0)) {
						res = "DENIED";
					} array[i]%2==0&&!(array[i]%3==0||array[i]%5==0) array[i]%2==0 array[i]%2 array[i] array i 2 0 !(array[i]%3==0||array[i]%5==0) (array[i]%3==0||array[i]%5==0) array[i]%3==0 array[i]%3 array[i] array i 3 0 array[i]%5==0 array[i]%5 array[i] array i 5 0 {
						res = "DENIED";
					} res = "DENIED" res "DENIED" System.out.println(res) System.out.println System.out System System.out res sc.close() sc.close sc public class Main {
	
		public static void main(String[] args) {
			solve();
		}
		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int array[] = new int[n];
			String res = "APPROVED";
			for(int i = 0;i<n;i++) {
				array[i] =sc.nextInt();
				if(array[i]%2==0&&!(array[i]%3==0||array[i]%5==0)) {
						res = "DENIED";
					}
				
			}
			System.out.println(res);
			sc.close();
		}	
	} public class Main {
	
		public static void main(String[] args) {
			solve();
		}
		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int array[] = new int[n];
			String res = "APPROVED";
			for(int i = 0;i<n;i++) {
				array[i] =sc.nextInt();
				if(array[i]%2==0&&!(array[i]%3==0||array[i]%5==0)) {
						res = "DENIED";
					}
				
			}
			System.out.println(res);
			sc.close();
		}	
	} Main
import java.util.Scanner;
	public class Main {
	
		public static void main(String[] args) {
			solve();
		}
		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int array[] = new int[n];
			String res = "APPROVED";
			for(int i = 0;i<n;i++) {
				array[i] =sc.nextInt();
				if(array[i]%2==0&&!(array[i]%3==0||array[i]%5==0)) {
						res = "DENIED";
					}
				
			}
			System.out.println(res);
			sc.close();
		}	
	}
	
