import java.util.*;
public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int array[]=new int[N+1];
		String ans="APPROVED";
		for(int i=1;i<=N;i++){
			array[i]=sc.nextInt();
		}
		for(int i=1;i<=N;i++){
			if ((array[i]%2)==0) {
				if (((array[i]%3)==0)||(((array[i]%5)==0))) {
				}
				else{
				ans="DENIED";
				}
			}

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

		}
		System.out.println(ans);
    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int array[]=new int[N+1];
		String ans="APPROVED";
		for(int i=1;i<=N;i++){
			array[i]=sc.nextInt();
		}
		for(int i=1;i<=N;i++){
			if ((array[i]%2)==0) {
				if (((array[i]%3)==0)||(((array[i]%5)==0))) {
				}
				else{
				ans="DENIED";
				}
			}

		}
		System.out.println(ans);
    } main {
    	Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int array[]=new int[N+1];
		String ans="APPROVED";
		for(int i=1;i<=N;i++){
			array[i]=sc.nextInt();
		}
		for(int i=1;i<=N;i++){
			if ((array[i]%2)==0) {
				if (((array[i]%3)==0)||(((array[i]%5)==0))) {
				}
				else{
				ans="DENIED";
				}
			}

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

		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			if ((array[i]%2)==0) {
				if (((array[i]%3)==0)||(((array[i]%5)==0))) {
				}
				else{
				ans="DENIED";
				}
			}

		} {
			if ((array[i]%2)==0) {
				if (((array[i]%3)==0)||(((array[i]%5)==0))) {
				}
				else{
				ans="DENIED";
				}
			}

		} if ((array[i]%2)==0) {
				if (((array[i]%3)==0)||(((array[i]%5)==0))) {
				}
				else{
				ans="DENIED";
				}
			} (array[i]%2)==0 (array[i]%2) array[i] array i 2 0 {
				if (((array[i]%3)==0)||(((array[i]%5)==0))) {
				}
				else{
				ans="DENIED";
				}
			} if (((array[i]%3)==0)||(((array[i]%5)==0))) {
				}
				else{
				ans="DENIED";
				} ((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 {
				} {
				ans="DENIED";
				} ans="DENIED" ans "DENIED" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int array[]=new int[N+1];
		String ans="APPROVED";
		for(int i=1;i<=N;i++){
			array[i]=sc.nextInt();
		}
		for(int i=1;i<=N;i++){
			if ((array[i]%2)==0) {
				if (((array[i]%3)==0)||(((array[i]%5)==0))) {
				}
				else{
				ans="DENIED";
				}
			}

		}
		System.out.println(ans);
    }
} public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int array[]=new int[N+1];
		String ans="APPROVED";
		for(int i=1;i<=N;i++){
			array[i]=sc.nextInt();
		}
		for(int i=1;i<=N;i++){
			if ((array[i]%2)==0) {
				if (((array[i]%3)==0)||(((array[i]%5)==0))) {
				}
				else{
				ans="DENIED";
				}
			}

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

		}
		System.out.println(ans);
    }
}