import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;

public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] a =  input.readLine().split(" ");
        for(String jude1 : a ){
            int jude2 = Integer.parseInt(jude1);
            if(jude2 % 2 == 0){
                if(!(jude2 % 5 == 0 || jude2 % 3 == 0)){
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        System.out.println("APPROVED");
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.HashSet; HashSet java.util import java.util.List; List java.util public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] a =  input.readLine().split(" ");
        for(String jude1 : a ){
            int jude2 = Integer.parseInt(jude1);
            if(jude2 % 2 == 0){
                if(!(jude2 % 5 == 0 || jude2 % 3 == 0)){
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        System.out.println("APPROVED");
    }
} Main public static void main(String[] args)throws IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] a =  input.readLine().split(" ");
        for(String jude1 : a ){
            int jude2 = Integer.parseInt(jude1);
            if(jude2 % 2 == 0){
                if(!(jude2 % 5 == 0 || jude2 % 3 == 0)){
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        System.out.println("APPROVED");
    } main {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] a =  input.readLine().split(" ");
        for(String jude1 : a ){
            int jude2 = Integer.parseInt(jude1);
            if(jude2 % 2 == 0){
                if(!(jude2 % 5 == 0 || jude2 % 3 == 0)){
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        System.out.println("APPROVED");
    } BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(input.readLine()); n Integer.parseInt(input.readLine()) Integer.parseInt Integer input.readLine() input.readLine input String[] a =  input.readLine().split(" "); a input.readLine().split(" ") input.readLine().split input.readLine() input.readLine input " " for(String jude1 : a ){
            int jude2 = Integer.parseInt(jude1);
            if(jude2 % 2 == 0){
                if(!(jude2 % 5 == 0 || jude2 % 3 == 0)){
                    System.out.println("DENIED");
                    return;
                }
            }
        } String jude1 a {
            int jude2 = Integer.parseInt(jude1);
            if(jude2 % 2 == 0){
                if(!(jude2 % 5 == 0 || jude2 % 3 == 0)){
                    System.out.println("DENIED");
                    return;
                }
            }
        } {
            int jude2 = Integer.parseInt(jude1);
            if(jude2 % 2 == 0){
                if(!(jude2 % 5 == 0 || jude2 % 3 == 0)){
                    System.out.println("DENIED");
                    return;
                }
            }
        } int jude2 = Integer.parseInt(jude1); jude2 Integer.parseInt(jude1) Integer.parseInt Integer jude1 if(jude2 % 2 == 0){
                if(!(jude2 % 5 == 0 || jude2 % 3 == 0)){
                    System.out.println("DENIED");
                    return;
                }
            } jude2 % 2 == 0 jude2 % 2 jude2 2 0 {
                if(!(jude2 % 5 == 0 || jude2 % 3 == 0)){
                    System.out.println("DENIED");
                    return;
                }
            } if(!(jude2 % 5 == 0 || jude2 % 3 == 0)){
                    System.out.println("DENIED");
                    return;
                } !(jude2 % 5 == 0 || jude2 % 3 == 0) (jude2 % 5 == 0 || jude2 % 3 == 0) jude2 % 5 == 0 jude2 % 5 jude2 5 0 jude2 % 3 == 0 jude2 % 3 jude2 3 0 {
                    System.out.println("DENIED");
                    return;
                } System.out.println("DENIED") System.out.println System.out System System.out "DENIED" return; System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" String[] args args public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] a =  input.readLine().split(" ");
        for(String jude1 : a ){
            int jude2 = Integer.parseInt(jude1);
            if(jude2 % 2 == 0){
                if(!(jude2 % 5 == 0 || jude2 % 3 == 0)){
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        System.out.println("APPROVED");
    }
} public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] a =  input.readLine().split(" ");
        for(String jude1 : a ){
            int jude2 = Integer.parseInt(jude1);
            if(jude2 % 2 == 0){
                if(!(jude2 % 5 == 0 || jude2 % 3 == 0)){
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        System.out.println("APPROVED");
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;

public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        String[] a =  input.readLine().split(" ");
        for(String jude1 : a ){
            int jude2 = Integer.parseInt(jude1);
            if(jude2 % 2 == 0){
                if(!(jude2 % 5 == 0 || jude2 % 3 == 0)){
                    System.out.println("DENIED");
                    return;
                }
            }
        }
        System.out.println("APPROVED");
    }
}