
import java.util.Scanner;

public class Main {

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

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		boolean ok = true;
		for(int i=0; i<n; i++) {
			int a=sc.nextInt();
			if(a%2==0) {
				if(a%3 != 0 && a%5 != 0) {
					ok=false;
					break;
				}
			}
		}
		if(ok) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

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

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		boolean ok = true;
		for(int i=0; i<n; i++) {
			int a=sc.nextInt();
			if(a%2==0) {
				if(a%3 != 0 && a%5 != 0) {
					ok=false;
					break;
				}
			}
		}
		if(ok) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		Main main = new Main();
		main.run();
	} main {
		Main main = new Main();
		main.run();
	} Main main = new Main(); main new Main() main.run() main.run main String[] args args public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		boolean ok = true;
		for(int i=0; i<n; i++) {
			int a=sc.nextInt();
			if(a%2==0) {
				if(a%3 != 0 && a%5 != 0) {
					ok=false;
					break;
				}
			}
		}
		if(ok) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
		sc.close();
	} run {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		boolean ok = true;
		for(int i=0; i<n; i++) {
			int a=sc.nextInt();
			if(a%2==0) {
				if(a%3 != 0 && a%5 != 0) {
					ok=false;
					break;
				}
			}
		}
		if(ok) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc boolean ok = true; ok true for(int i=0; i<n; i++) {
			int a=sc.nextInt();
			if(a%2==0) {
				if(a%3 != 0 && a%5 != 0) {
					ok=false;
					break;
				}
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int a=sc.nextInt();
			if(a%2==0) {
				if(a%3 != 0 && a%5 != 0) {
					ok=false;
					break;
				}
			}
		} {
			int a=sc.nextInt();
			if(a%2==0) {
				if(a%3 != 0 && a%5 != 0) {
					ok=false;
					break;
				}
			}
		} int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc if(a%2==0) {
				if(a%3 != 0 && a%5 != 0) {
					ok=false;
					break;
				}
			} a%2==0 a%2 a 2 0 {
				if(a%3 != 0 && a%5 != 0) {
					ok=false;
					break;
				}
			} if(a%3 != 0 && a%5 != 0) {
					ok=false;
					break;
				} a%3 != 0 && a%5 != 0 a%3 != 0 a%3 a 3 0 a%5 != 0 a%5 a 5 0 {
					ok=false;
					break;
				} ok=false ok false break; if(ok) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		} ok {
			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" sc.close() sc.close sc public class Main {

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

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		boolean ok = true;
		for(int i=0; i<n; i++) {
			int a=sc.nextInt();
			if(a%2==0) {
				if(a%3 != 0 && a%5 != 0) {
					ok=false;
					break;
				}
			}
		}
		if(ok) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
		sc.close();
	}
} public class Main {

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

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		boolean ok = true;
		for(int i=0; i<n; i++) {
			int a=sc.nextInt();
			if(a%2==0) {
				if(a%3 != 0 && a%5 != 0) {
					ok=false;
					break;
				}
			}
		}
		if(ok) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
		sc.close();
	}
} Main

import java.util.Scanner;

public class Main {

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

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		boolean ok = true;
		for(int i=0; i<n; i++) {
			int a=sc.nextInt();
			if(a%2==0) {
				if(a%3 != 0 && a%5 != 0) {
					ok=false;
					break;
				}
			}
		}
		if(ok) {
			System.out.println("APPROVED");
		}else {
			System.out.println("DENIED");
		}
		sc.close();
	}
}
