import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n= stdIn.nextInt();
		int[] h = new int[n];
	    for(int i=0 ; i<n ; i++){
	        h[i] = stdIn.nextInt();
	    }
	    int i;
	    for(i=0 ; i<n ; i++){
	        if(h[i] %2 ==0){
	            if((h[i]%3==0||h[i]%5==0)){
	            }else{
	                break;
	            }
	        }
	    }
	    if(i==n)    System.out.println("APPROVED");
	    else    System.out.println("DENIED");
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n= stdIn.nextInt();
		int[] h = new int[n];
	    for(int i=0 ; i<n ; i++){
	        h[i] = stdIn.nextInt();
	    }
	    int i;
	    for(i=0 ; i<n ; i++){
	        if(h[i] %2 ==0){
	            if((h[i]%3==0||h[i]%5==0)){
	            }else{
	                break;
	            }
	        }
	    }
	    if(i==n)    System.out.println("APPROVED");
	    else    System.out.println("DENIED");
	}
} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n= stdIn.nextInt();
		int[] h = new int[n];
	    for(int i=0 ; i<n ; i++){
	        h[i] = stdIn.nextInt();
	    }
	    int i;
	    for(i=0 ; i<n ; i++){
	        if(h[i] %2 ==0){
	            if((h[i]%3==0||h[i]%5==0)){
	            }else{
	                break;
	            }
	        }
	    }
	    if(i==n)    System.out.println("APPROVED");
	    else    System.out.println("DENIED");
	} main {
		Scanner stdIn = new Scanner(System.in);
		int n= stdIn.nextInt();
		int[] h = new int[n];
	    for(int i=0 ; i<n ; i++){
	        h[i] = stdIn.nextInt();
	    }
	    int i;
	    for(i=0 ; i<n ; i++){
	        if(h[i] %2 ==0){
	            if((h[i]%3==0||h[i]%5==0)){
	            }else{
	                break;
	            }
	        }
	    }
	    if(i==n)    System.out.println("APPROVED");
	    else    System.out.println("DENIED");
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n= stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int[] h = new int[n]; h new int[n] n for(int i=0 ; i<n ; i++){
	        h[i] = stdIn.nextInt();
	    } int i=0 ; int i=0 ; i 0 i<n i n i++ i++ i {
	        h[i] = stdIn.nextInt();
	    } {
	        h[i] = stdIn.nextInt();
	    } h[i] = stdIn.nextInt() h[i] h i stdIn.nextInt() stdIn.nextInt stdIn int i; i for(i=0 ; i<n ; i++){
	        if(h[i] %2 ==0){
	            if((h[i]%3==0||h[i]%5==0)){
	            }else{
	                break;
	            }
	        }
	    } i=0 ; i=0 i 0 i<n i n i++ i++ i {
	        if(h[i] %2 ==0){
	            if((h[i]%3==0||h[i]%5==0)){
	            }else{
	                break;
	            }
	        }
	    } {
	        if(h[i] %2 ==0){
	            if((h[i]%3==0||h[i]%5==0)){
	            }else{
	                break;
	            }
	        }
	    } if(h[i] %2 ==0){
	            if((h[i]%3==0||h[i]%5==0)){
	            }else{
	                break;
	            }
	        } h[i] %2 ==0 h[i] %2 h[i] h i 2 0 {
	            if((h[i]%3==0||h[i]%5==0)){
	            }else{
	                break;
	            }
	        } if((h[i]%3==0||h[i]%5==0)){
	            }else{
	                break;
	            } (h[i]%3==0||h[i]%5==0) h[i]%3==0 h[i]%3 h[i] h i 3 0 h[i]%5==0 h[i]%5 h[i] h i 5 0 {
	            } {
	                break;
	            } break; if(i==n)    System.out.println("APPROVED");
	    else    System.out.println("DENIED"); i==n i n System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" 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 stdIn = new Scanner(System.in);
		int n= stdIn.nextInt();
		int[] h = new int[n];
	    for(int i=0 ; i<n ; i++){
	        h[i] = stdIn.nextInt();
	    }
	    int i;
	    for(i=0 ; i<n ; i++){
	        if(h[i] %2 ==0){
	            if((h[i]%3==0||h[i]%5==0)){
	            }else{
	                break;
	            }
	        }
	    }
	    if(i==n)    System.out.println("APPROVED");
	    else    System.out.println("DENIED");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n= stdIn.nextInt();
		int[] h = new int[n];
	    for(int i=0 ; i<n ; i++){
	        h[i] = stdIn.nextInt();
	    }
	    int i;
	    for(i=0 ; i<n ; i++){
	        if(h[i] %2 ==0){
	            if((h[i]%3==0||h[i]%5==0)){
	            }else{
	                break;
	            }
	        }
	    }
	    if(i==n)    System.out.println("APPROVED");
	    else    System.out.println("DENIED");
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n= stdIn.nextInt();
		int[] h = new int[n];
	    for(int i=0 ; i<n ; i++){
	        h[i] = stdIn.nextInt();
	    }
	    int i;
	    for(i=0 ; i<n ; i++){
	        if(h[i] %2 ==0){
	            if((h[i]%3==0||h[i]%5==0)){
	            }else{
	                break;
	            }
	        }
	    }
	    if(i==n)    System.out.println("APPROVED");
	    else    System.out.println("DENIED");
	}
}
