import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
	    // input : N A1 A2 ... An
        // An がすべて、奇数か、偶数かつ 3 か 5 で割り切れるなら APPROVED
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        String retStr = "APPROVED";
        for(int i = 0; i < num; i++){
            int testNum = sc.nextInt();
            if(testNum % 2 == 0 && (testNum % 3 != 0 && testNum % 5 != 0)){
                retStr = "DENIED";
            }
        }
        System.out.println(retStr);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
	    // input : N A1 A2 ... An
        // An がすべて、奇数か、偶数かつ 3 か 5 で割り切れるなら APPROVED
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        String retStr = "APPROVED";
        for(int i = 0; i < num; i++){
            int testNum = sc.nextInt();
            if(testNum % 2 == 0 && (testNum % 3 != 0 && testNum % 5 != 0)){
                retStr = "DENIED";
            }
        }
        System.out.println(retStr);
    }
} Main public static void main(String[] args) {
	    // input : N A1 A2 ... An
        // An がすべて、奇数か、偶数かつ 3 か 5 で割り切れるなら APPROVED
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        String retStr = "APPROVED";
        for(int i = 0; i < num; i++){
            int testNum = sc.nextInt();
            if(testNum % 2 == 0 && (testNum % 3 != 0 && testNum % 5 != 0)){
                retStr = "DENIED";
            }
        }
        System.out.println(retStr);
    } main {
	    // input : N A1 A2 ... An
        // An がすべて、奇数か、偶数かつ 3 か 5 で割り切れるなら APPROVED
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        String retStr = "APPROVED";
        for(int i = 0; i < num; i++){
            int testNum = sc.nextInt();
            if(testNum % 2 == 0 && (testNum % 3 != 0 && testNum % 5 != 0)){
                retStr = "DENIED";
            }
        }
        System.out.println(retStr);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc String retStr = "APPROVED"; retStr "APPROVED" for(int i = 0; i < num; i++){
            int testNum = sc.nextInt();
            if(testNum % 2 == 0 && (testNum % 3 != 0 && testNum % 5 != 0)){
                retStr = "DENIED";
            }
        } int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
            int testNum = sc.nextInt();
            if(testNum % 2 == 0 && (testNum % 3 != 0 && testNum % 5 != 0)){
                retStr = "DENIED";
            }
        } {
            int testNum = sc.nextInt();
            if(testNum % 2 == 0 && (testNum % 3 != 0 && testNum % 5 != 0)){
                retStr = "DENIED";
            }
        } int testNum = sc.nextInt(); testNum sc.nextInt() sc.nextInt sc if(testNum % 2 == 0 && (testNum % 3 != 0 && testNum % 5 != 0)){
                retStr = "DENIED";
            } testNum % 2 == 0 && (testNum % 3 != 0 && testNum % 5 != 0) testNum % 2 == 0 testNum % 2 testNum 2 0 (testNum % 3 != 0 && testNum % 5 != 0) testNum % 3 != 0 testNum % 3 testNum 3 0 testNum % 5 != 0 testNum % 5 testNum 5 0 {
                retStr = "DENIED";
            } retStr = "DENIED" retStr "DENIED" System.out.println(retStr) System.out.println System.out System System.out retStr String[] args args public class Main {

    public static void main(String[] args) {
	    // input : N A1 A2 ... An
        // An がすべて、奇数か、偶数かつ 3 か 5 で割り切れるなら APPROVED
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        String retStr = "APPROVED";
        for(int i = 0; i < num; i++){
            int testNum = sc.nextInt();
            if(testNum % 2 == 0 && (testNum % 3 != 0 && testNum % 5 != 0)){
                retStr = "DENIED";
            }
        }
        System.out.println(retStr);
    }
} public class Main {

    public static void main(String[] args) {
	    // input : N A1 A2 ... An
        // An がすべて、奇数か、偶数かつ 3 か 5 で割り切れるなら APPROVED
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        String retStr = "APPROVED";
        for(int i = 0; i < num; i++){
            int testNum = sc.nextInt();
            if(testNum % 2 == 0 && (testNum % 3 != 0 && testNum % 5 != 0)){
                retStr = "DENIED";
            }
        }
        System.out.println(retStr);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
	    // input : N A1 A2 ... An
        // An がすべて、奇数か、偶数かつ 3 か 5 で割り切れるなら APPROVED
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        String retStr = "APPROVED";
        for(int i = 0; i < num; i++){
            int testNum = sc.nextInt();
            if(testNum % 2 == 0 && (testNum % 3 != 0 && testNum % 5 != 0)){
                retStr = "DENIED";
            }
        }
        System.out.println(retStr);
    }
}
