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());

	int a ;
	String result = "APPROVED";

	for (int i=0;result.equals("APPROVED") && i < N;i++){

	    a = Integer.parseInt(sc.next());

	    if(a%2 == 0){
		if(a%3 == 0 || a%5 == 0){
		}else {
		    result = "DENIED";
		}
	    }
		   
	}
	System.out.println(result);
    }
} 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());

	int a ;
	String result = "APPROVED";

	for (int i=0;result.equals("APPROVED") && i < N;i++){

	    a = Integer.parseInt(sc.next());

	    if(a%2 == 0){
		if(a%3 == 0 || a%5 == 0){
		}else {
		    result = "DENIED";
		}
	    }
		   
	}
	System.out.println(result);
    }
} Main public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());

	int a ;
	String result = "APPROVED";

	for (int i=0;result.equals("APPROVED") && i < N;i++){

	    a = Integer.parseInt(sc.next());

	    if(a%2 == 0){
		if(a%3 == 0 || a%5 == 0){
		}else {
		    result = "DENIED";
		}
	    }
		   
	}
	System.out.println(result);
    } main {
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());

	int a ;
	String result = "APPROVED";

	for (int i=0;result.equals("APPROVED") && i < N;i++){

	    a = Integer.parseInt(sc.next());

	    if(a%2 == 0){
		if(a%3 == 0 || a%5 == 0){
		}else {
		    result = "DENIED";
		}
	    }
		   
	}
	System.out.println(result);
    } 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 int a ; a String result = "APPROVED"; result "APPROVED" for (int i=0;result.equals("APPROVED") && i < N;i++){

	    a = Integer.parseInt(sc.next());

	    if(a%2 == 0){
		if(a%3 == 0 || a%5 == 0){
		}else {
		    result = "DENIED";
		}
	    }
		   
	} int i=0; int i=0; i 0 result.equals("APPROVED") && i < N result.equals("APPROVED") result.equals result "APPROVED" i < N i N i++ i++ i {

	    a = Integer.parseInt(sc.next());

	    if(a%2 == 0){
		if(a%3 == 0 || a%5 == 0){
		}else {
		    result = "DENIED";
		}
	    }
		   
	} {

	    a = Integer.parseInt(sc.next());

	    if(a%2 == 0){
		if(a%3 == 0 || a%5 == 0){
		}else {
		    result = "DENIED";
		}
	    }
		   
	} a = Integer.parseInt(sc.next()) a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(a%2 == 0){
		if(a%3 == 0 || a%5 == 0){
		}else {
		    result = "DENIED";
		}
	    } a%2 == 0 a%2 a 2 0 {
		if(a%3 == 0 || a%5 == 0){
		}else {
		    result = "DENIED";
		}
	    } if(a%3 == 0 || a%5 == 0){
		}else {
		    result = "DENIED";
		} a%3 == 0 || a%5 == 0 a%3 == 0 a%3 a 3 0 a%5 == 0 a%5 a 5 0 {
		} {
		    result = "DENIED";
		} result = "DENIED" result "DENIED" System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());

	int a ;
	String result = "APPROVED";

	for (int i=0;result.equals("APPROVED") && i < N;i++){

	    a = Integer.parseInt(sc.next());

	    if(a%2 == 0){
		if(a%3 == 0 || a%5 == 0){
		}else {
		    result = "DENIED";
		}
	    }
		   
	}
	System.out.println(result);
    }
} public class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N = Integer.parseInt(sc.next());

	int a ;
	String result = "APPROVED";

	for (int i=0;result.equals("APPROVED") && i < N;i++){

	    a = Integer.parseInt(sc.next());

	    if(a%2 == 0){
		if(a%3 == 0 || a%5 == 0){
		}else {
		    result = "DENIED";
		}
	    }
		   
	}
	System.out.println(result);
    }
} Main
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());

	int a ;
	String result = "APPROVED";

	for (int i=0;result.equals("APPROVED") && i < N;i++){

	    a = Integer.parseInt(sc.next());

	    if(a%2 == 0){
		if(a%3 == 0 || a%5 == 0){
		}else {
		    result = "DENIED";
		}
	    }
		   
	}
	System.out.println(result);
    }
}
