import java.util.*;

public class Main {

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        boolean approved = true;
        for(int i = 0 ; i < n ; i++){
            int a = scanner.nextInt();
            if(a % 2 == 0){
                if(a % 3 == 0 || a % 5 == 0){
                    ;
                }else{
                    approved = false;
                    break;
                }
            }
        }

        System.out.println(approved ? "APPROVED" : "DENIED");

    }

} import java.util.*; util.* java public class Main {

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        boolean approved = true;
        for(int i = 0 ; i < n ; i++){
            int a = scanner.nextInt();
            if(a % 2 == 0){
                if(a % 3 == 0 || a % 5 == 0){
                    ;
                }else{
                    approved = false;
                    break;
                }
            }
        }

        System.out.println(approved ? "APPROVED" : "DENIED");

    }

} Main public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        boolean approved = true;
        for(int i = 0 ; i < n ; i++){
            int a = scanner.nextInt();
            if(a % 2 == 0){
                if(a % 3 == 0 || a % 5 == 0){
                    ;
                }else{
                    approved = false;
                    break;
                }
            }
        }

        System.out.println(approved ? "APPROVED" : "DENIED");

    } main {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        boolean approved = true;
        for(int i = 0 ; i < n ; i++){
            int a = scanner.nextInt();
            if(a % 2 == 0){
                if(a % 3 == 0 || a % 5 == 0){
                    ;
                }else{
                    approved = false;
                    break;
                }
            }
        }

        System.out.println(approved ? "APPROVED" : "DENIED");

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner boolean approved = true; approved true for(int i = 0 ; i < n ; i++){
            int a = scanner.nextInt();
            if(a % 2 == 0){
                if(a % 3 == 0 || a % 5 == 0){
                    ;
                }else{
                    approved = false;
                    break;
                }
            }
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            int a = scanner.nextInt();
            if(a % 2 == 0){
                if(a % 3 == 0 || a % 5 == 0){
                    ;
                }else{
                    approved = false;
                    break;
                }
            }
        } {
            int a = scanner.nextInt();
            if(a % 2 == 0){
                if(a % 3 == 0 || a % 5 == 0){
                    ;
                }else{
                    approved = false;
                    break;
                }
            }
        } int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner if(a % 2 == 0){
                if(a % 3 == 0 || a % 5 == 0){
                    ;
                }else{
                    approved = false;
                    break;
                }
            } a % 2 == 0 a % 2 a 2 0 {
                if(a % 3 == 0 || a % 5 == 0){
                    ;
                }else{
                    approved = false;
                    break;
                }
            } if(a % 3 == 0 || a % 5 == 0){
                    ;
                }else{
                    approved = false;
                    break;
                } a % 3 == 0 || a % 5 == 0 a % 3 == 0 a % 3 a 3 0 a % 5 == 0 a % 5 a 5 0 {
                    ;
                } {
                    approved = false;
                    break;
                } approved = false approved false break; System.out.println(approved ? "APPROVED" : "DENIED") System.out.println System.out System System.out approved ? "APPROVED" : "DENIED" approved "APPROVED" "DENIED" String[] args args public class Main {

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        boolean approved = true;
        for(int i = 0 ; i < n ; i++){
            int a = scanner.nextInt();
            if(a % 2 == 0){
                if(a % 3 == 0 || a % 5 == 0){
                    ;
                }else{
                    approved = false;
                    break;
                }
            }
        }

        System.out.println(approved ? "APPROVED" : "DENIED");

    }

} public class Main {

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        boolean approved = true;
        for(int i = 0 ; i < n ; i++){
            int a = scanner.nextInt();
            if(a % 2 == 0){
                if(a % 3 == 0 || a % 5 == 0){
                    ;
                }else{
                    approved = false;
                    break;
                }
            }
        }

        System.out.println(approved ? "APPROVED" : "DENIED");

    }

} Main
import java.util.*;

public class Main {

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        boolean approved = true;
        for(int i = 0 ; i < n ; i++){
            int a = scanner.nextInt();
            if(a % 2 == 0){
                if(a % 3 == 0 || a % 5 == 0){
                    ;
                }else{
                    approved = false;
                    break;
                }
            }
        }

        System.out.println(approved ? "APPROVED" : "DENIED");

    }

}