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

