import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        int n = Integer.parseInt(sc.next());
        int a;
        boolean ans = true;
        for (int i = 0; i < n; i++) {
            a = Integer.parseInt(sc.next());
            if (a % 2 == 0 && a % 3 != 0 && a % 5 != 0) ans = false;
        }
        out.println(ans ? "APPROVED" : "DENIED");
        out.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        int n = Integer.parseInt(sc.next());
        int a;
        boolean ans = true;
        for (int i = 0; i < n; i++) {
            a = Integer.parseInt(sc.next());
            if (a % 2 == 0 && a % 3 != 0 && a % 5 != 0) ans = false;
        }
        out.println(ans ? "APPROVED" : "DENIED");
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        int n = Integer.parseInt(sc.next());
        int a;
        boolean ans = true;
        for (int i = 0; i < n; i++) {
            a = Integer.parseInt(sc.next());
            if (a % 2 == 0 && a % 3 != 0 && a % 5 != 0) ans = false;
        }
        out.println(ans ? "APPROVED" : "DENIED");
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        int n = Integer.parseInt(sc.next());
        int a;
        boolean ans = true;
        for (int i = 0; i < n; i++) {
            a = Integer.parseInt(sc.next());
            if (a % 2 == 0 && a % 3 != 0 && a % 5 != 0) ans = false;
        }
        out.println(ans ? "APPROVED" : "DENIED");
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int a; a boolean ans = true; ans true for (int i = 0; i < n; i++) {
            a = Integer.parseInt(sc.next());
            if (a % 2 == 0 && a % 3 != 0 && a % 5 != 0) ans = false;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            a = Integer.parseInt(sc.next());
            if (a % 2 == 0 && a % 3 != 0 && a % 5 != 0) ans = false;
        } {
            a = Integer.parseInt(sc.next());
            if (a % 2 == 0 && a % 3 != 0 && a % 5 != 0) ans = false;
        } a = Integer.parseInt(sc.next()) a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if (a % 2 == 0 && a % 3 != 0 && a % 5 != 0) ans = false; a % 2 == 0 && a % 3 != 0 && a % 5 != 0 a % 2 == 0 && a % 3 != 0 && a % 5 != 0 a % 2 == 0 a % 2 a 2 0 a % 3 != 0 a % 3 a 3 0 a % 5 != 0 a % 5 a 5 0 ans = false ans false out.println(ans ? "APPROVED" : "DENIED") out.println out ans ? "APPROVED" : "DENIED" ans "APPROVED" "DENIED" out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        int n = Integer.parseInt(sc.next());
        int a;
        boolean ans = true;
        for (int i = 0; i < n; i++) {
            a = Integer.parseInt(sc.next());
            if (a % 2 == 0 && a % 3 != 0 && a % 5 != 0) ans = false;
        }
        out.println(ans ? "APPROVED" : "DENIED");
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        int n = Integer.parseInt(sc.next());
        int a;
        boolean ans = true;
        for (int i = 0; i < n; i++) {
            a = Integer.parseInt(sc.next());
            if (a % 2 == 0 && a % 3 != 0 && a % 5 != 0) ans = false;
        }
        out.println(ans ? "APPROVED" : "DENIED");
        out.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        sc.useDelimiter(",");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        int n = Integer.parseInt(sc.next());
        int a;
        boolean ans = true;
        for (int i = 0; i < n; i++) {
            a = Integer.parseInt(sc.next());
            if (a % 2 == 0 && a % 3 != 0 && a % 5 != 0) ans = false;
        }
        out.println(ans ? "APPROVED" : "DENIED");
        out.flush();
    }
}