import java.util.Scanner;

public class Main { //クラス名はMain
    public static void main(String[] args) {
        //コード
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        boolean j = true;

        for(int i=0; i<n ; i++){
            int a = Integer.parseInt(sc.next());
            if(a%2 == 0){
                if(a%3 != 0 && a%5 != 0){
                    j = false;
                }
            }
        }
        if(j){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main { //クラス名はMain
    public static void main(String[] args) {
        //コード
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        boolean j = true;

        for(int i=0; i<n ; i++){
            int a = Integer.parseInt(sc.next());
            if(a%2 == 0){
                if(a%3 != 0 && a%5 != 0){
                    j = false;
                }
            }
        }
        if(j){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    }
} Main public static void main(String[] args) {
        //コード
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        boolean j = true;

        for(int i=0; i<n ; i++){
            int a = Integer.parseInt(sc.next());
            if(a%2 == 0){
                if(a%3 != 0 && a%5 != 0){
                    j = false;
                }
            }
        }
        if(j){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    } main {
        //コード
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        boolean j = true;

        for(int i=0; i<n ; i++){
            int a = Integer.parseInt(sc.next());
            if(a%2 == 0){
                if(a%3 != 0 && a%5 != 0){
                    j = false;
                }
            }
        }
        if(j){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc boolean j = true; j true for(int i=0; i<n ; i++){
            int a = Integer.parseInt(sc.next());
            if(a%2 == 0){
                if(a%3 != 0 && a%5 != 0){
                    j = false;
                }
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            int a = Integer.parseInt(sc.next());
            if(a%2 == 0){
                if(a%3 != 0 && a%5 != 0){
                    j = false;
                }
            }
        } {
            int a = Integer.parseInt(sc.next());
            if(a%2 == 0){
                if(a%3 != 0 && a%5 != 0){
                    j = false;
                }
            }
        } int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(a%2 == 0){
                if(a%3 != 0 && a%5 != 0){
                    j = false;
                }
            } a%2 == 0 a%2 a 2 0 {
                if(a%3 != 0 && a%5 != 0){
                    j = false;
                }
            } if(a%3 != 0 && a%5 != 0){
                    j = false;
                } a%3 != 0 && a%5 != 0 a%3 != 0 a%3 a 3 0 a%5 != 0 a%5 a 5 0 {
                    j = false;
                } j = false j false if(j){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        } j {
            System.out.println("APPROVED");
        } System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" {
            System.out.println("DENIED");
        } System.out.println("DENIED") System.out.println System.out System System.out "DENIED" String[] args args public class Main { //クラス名はMain
    public static void main(String[] args) {
        //コード
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        boolean j = true;

        for(int i=0; i<n ; i++){
            int a = Integer.parseInt(sc.next());
            if(a%2 == 0){
                if(a%3 != 0 && a%5 != 0){
                    j = false;
                }
            }
        }
        if(j){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    }
} public class Main { //クラス名はMain
    public static void main(String[] args) {
        //コード
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        boolean j = true;

        for(int i=0; i<n ; i++){
            int a = Integer.parseInt(sc.next());
            if(a%2 == 0){
                if(a%3 != 0 && a%5 != 0){
                    j = false;
                }
            }
        }
        if(j){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    }
} Main
import java.util.Scanner;

public class Main { //クラス名はMain
    public static void main(String[] args) {
        //コード
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        boolean j = true;

        for(int i=0; i<n ; i++){
            int a = Integer.parseInt(sc.next());
            if(a%2 == 0){
                if(a%3 != 0 && a%5 != 0){
                    j = false;
                }
            }
        }
        if(j){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    }
}