import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        
        int n = Integer.parseInt(br.readLine());
        String[] input = br.readLine().split(" ");
        int[] numbers = new int[n];
        String ans = "APPROVED";
        
        for(int i = 0; i < n; i++){
            numbers[i] = Integer.parseInt(input[i]);
            if(numbers[i] % 2 == 0){
                if(numbers[i] % 3 != 0 && numbers[i] % 5 != 0){
                    ans = "DENIED";
                    break;
                }
            }
        }
        
        out.println(ans);
        out.close();
        
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        
        int n = Integer.parseInt(br.readLine());
        String[] input = br.readLine().split(" ");
        int[] numbers = new int[n];
        String ans = "APPROVED";
        
        for(int i = 0; i < n; i++){
            numbers[i] = Integer.parseInt(input[i]);
            if(numbers[i] % 2 == 0){
                if(numbers[i] % 3 != 0 && numbers[i] % 5 != 0){
                    ans = "DENIED";
                    break;
                }
            }
        }
        
        out.println(ans);
        out.close();
        
    }
} Main public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        
        int n = Integer.parseInt(br.readLine());
        String[] input = br.readLine().split(" ");
        int[] numbers = new int[n];
        String ans = "APPROVED";
        
        for(int i = 0; i < n; i++){
            numbers[i] = Integer.parseInt(input[i]);
            if(numbers[i] % 2 == 0){
                if(numbers[i] % 3 != 0 && numbers[i] % 5 != 0){
                    ans = "DENIED";
                    break;
                }
            }
        }
        
        out.println(ans);
        out.close();
        
    } main {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        
        int n = Integer.parseInt(br.readLine());
        String[] input = br.readLine().split(" ");
        int[] numbers = new int[n];
        String ans = "APPROVED";
        
        for(int i = 0; i < n; i++){
            numbers[i] = Integer.parseInt(input[i]);
            if(numbers[i] % 2 == 0){
                if(numbers[i] % 3 != 0 && numbers[i] % 5 != 0){
                    ans = "DENIED";
                    break;
                }
            }
        }
        
        out.println(ans);
        out.close();
        
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); out new PrintWriter(new OutputStreamWriter(System.out)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String[] input = br.readLine().split(" "); input br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int[] numbers = new int[n]; numbers new int[n] n String ans = "APPROVED"; ans "APPROVED" for(int i = 0; i < n; i++){
            numbers[i] = Integer.parseInt(input[i]);
            if(numbers[i] % 2 == 0){
                if(numbers[i] % 3 != 0 && numbers[i] % 5 != 0){
                    ans = "DENIED";
                    break;
                }
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            numbers[i] = Integer.parseInt(input[i]);
            if(numbers[i] % 2 == 0){
                if(numbers[i] % 3 != 0 && numbers[i] % 5 != 0){
                    ans = "DENIED";
                    break;
                }
            }
        } {
            numbers[i] = Integer.parseInt(input[i]);
            if(numbers[i] % 2 == 0){
                if(numbers[i] % 3 != 0 && numbers[i] % 5 != 0){
                    ans = "DENIED";
                    break;
                }
            }
        } numbers[i] = Integer.parseInt(input[i]) numbers[i] numbers i Integer.parseInt(input[i]) Integer.parseInt Integer input[i] input i if(numbers[i] % 2 == 0){
                if(numbers[i] % 3 != 0 && numbers[i] % 5 != 0){
                    ans = "DENIED";
                    break;
                }
            } numbers[i] % 2 == 0 numbers[i] % 2 numbers[i] numbers i 2 0 {
                if(numbers[i] % 3 != 0 && numbers[i] % 5 != 0){
                    ans = "DENIED";
                    break;
                }
            } if(numbers[i] % 3 != 0 && numbers[i] % 5 != 0){
                    ans = "DENIED";
                    break;
                } numbers[i] % 3 != 0 && numbers[i] % 5 != 0 numbers[i] % 3 != 0 numbers[i] % 3 numbers[i] numbers i 3 0 numbers[i] % 5 != 0 numbers[i] % 5 numbers[i] numbers i 5 0 {
                    ans = "DENIED";
                    break;
                } ans = "DENIED" ans "DENIED" break; out.println(ans) out.println out ans out.close() out.close out String[] args args public class Main {
    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        
        int n = Integer.parseInt(br.readLine());
        String[] input = br.readLine().split(" ");
        int[] numbers = new int[n];
        String ans = "APPROVED";
        
        for(int i = 0; i < n; i++){
            numbers[i] = Integer.parseInt(input[i]);
            if(numbers[i] % 2 == 0){
                if(numbers[i] % 3 != 0 && numbers[i] % 5 != 0){
                    ans = "DENIED";
                    break;
                }
            }
        }
        
        out.println(ans);
        out.close();
        
    }
} public class Main {
    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        
        int n = Integer.parseInt(br.readLine());
        String[] input = br.readLine().split(" ");
        int[] numbers = new int[n];
        String ans = "APPROVED";
        
        for(int i = 0; i < n; i++){
            numbers[i] = Integer.parseInt(input[i]);
            if(numbers[i] % 2 == 0){
                if(numbers[i] % 3 != 0 && numbers[i] % 5 != 0){
                    ans = "DENIED";
                    break;
                }
            }
        }
        
        out.println(ans);
        out.close();
        
    }
} Main
import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        
        int n = Integer.parseInt(br.readLine());
        String[] input = br.readLine().split(" ");
        int[] numbers = new int[n];
        String ans = "APPROVED";
        
        for(int i = 0; i < n; i++){
            numbers[i] = Integer.parseInt(input[i]);
            if(numbers[i] % 2 == 0){
                if(numbers[i] % 3 != 0 && numbers[i] % 5 != 0){
                    ans = "DENIED";
                    break;
                }
            }
        }
        
        out.println(ans);
        out.close();
        
    }
}