import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        List<Integer> g = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            int a = sc.nextInt();
            if (a % 2 == 0) g.add(a);
        }

        String result = "APPROVED";
        for (int b : g) {
            if (b % 3 != 0 && b % 5 != 0) {
                result = "DENIED";
                break;
            }
        }

        System.out.println(result);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        List<Integer> g = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            int a = sc.nextInt();
            if (a % 2 == 0) g.add(a);
        }

        String result = "APPROVED";
        for (int b : g) {
            if (b % 3 != 0 && b % 5 != 0) {
                result = "DENIED";
                break;
            }
        }

        System.out.println(result);
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        List<Integer> g = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            int a = sc.nextInt();
            if (a % 2 == 0) g.add(a);
        }

        String result = "APPROVED";
        for (int b : g) {
            if (b % 3 != 0 && b % 5 != 0) {
                result = "DENIED";
                break;
            }
        }

        System.out.println(result);
    } main {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        List<Integer> g = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            int a = sc.nextInt();
            if (a % 2 == 0) g.add(a);
        }

        String result = "APPROVED";
        for (int b : g) {
            if (b % 3 != 0 && b % 5 != 0) {
                result = "DENIED";
                break;
            }
        }

        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc List<Integer> g = new ArrayList<>(); g new ArrayList<>() for (int i = 0; i < n; i++) {
            int a = sc.nextInt();
            if (a % 2 == 0) g.add(a);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int a = sc.nextInt();
            if (a % 2 == 0) g.add(a);
        } {
            int a = sc.nextInt();
            if (a % 2 == 0) g.add(a);
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc if (a % 2 == 0) g.add(a); a % 2 == 0 a % 2 a 2 0 g.add(a) g.add g a String result = "APPROVED"; result "APPROVED" for (int b : g) {
            if (b % 3 != 0 && b % 5 != 0) {
                result = "DENIED";
                break;
            }
        } int b g {
            if (b % 3 != 0 && b % 5 != 0) {
                result = "DENIED";
                break;
            }
        } {
            if (b % 3 != 0 && b % 5 != 0) {
                result = "DENIED";
                break;
            }
        } if (b % 3 != 0 && b % 5 != 0) {
                result = "DENIED";
                break;
            } b % 3 != 0 && b % 5 != 0 b % 3 != 0 b % 3 b 3 0 b % 5 != 0 b % 5 b 5 0 {
                result = "DENIED";
                break;
            } result = "DENIED" result "DENIED" break; System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        List<Integer> g = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            int a = sc.nextInt();
            if (a % 2 == 0) g.add(a);
        }

        String result = "APPROVED";
        for (int b : g) {
            if (b % 3 != 0 && b % 5 != 0) {
                result = "DENIED";
                break;
            }
        }

        System.out.println(result);
    }
} public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        List<Integer> g = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            int a = sc.nextInt();
            if (a % 2 == 0) g.add(a);
        }

        String result = "APPROVED";
        for (int b : g) {
            if (b % 3 != 0 && b % 5 != 0) {
                result = "DENIED";
                break;
            }
        }

        System.out.println(result);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        List<Integer> g = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            int a = sc.nextInt();
            if (a % 2 == 0) g.add(a);
        }

        String result = "APPROVED";
        for (int b : g) {
            if (b % 3 != 0 && b % 5 != 0) {
                result = "DENIED";
                break;
            }
        }

        System.out.println(result);
    }
}