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