import java.util.ArrayList;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<Integer> list = new ArrayList<>(n);
        for (int i = 0; i < n; i++) {
            list.add(Integer.parseInt(sc.next()));
        }
        String answer = "APPROVED";
        for (Integer i : list) {
            if ((i % 2) != 0) {
                continue;
            }
            if (((i % 3) == 0) || ((i % 5) == 0)) {
                answer = "APPROVED";
            } else {
                answer = "DENIED";
                break;
            }
        }
        System.out.println(answer);
        sc.close();
    }

} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<Integer> list = new ArrayList<>(n);
        for (int i = 0; i < n; i++) {
            list.add(Integer.parseInt(sc.next()));
        }
        String answer = "APPROVED";
        for (Integer i : list) {
            if ((i % 2) != 0) {
                continue;
            }
            if (((i % 3) == 0) || ((i % 5) == 0)) {
                answer = "APPROVED";
            } else {
                answer = "DENIED";
                break;
            }
        }
        System.out.println(answer);
        sc.close();
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<Integer> list = new ArrayList<>(n);
        for (int i = 0; i < n; i++) {
            list.add(Integer.parseInt(sc.next()));
        }
        String answer = "APPROVED";
        for (Integer i : list) {
            if ((i % 2) != 0) {
                continue;
            }
            if (((i % 3) == 0) || ((i % 5) == 0)) {
                answer = "APPROVED";
            } else {
                answer = "DENIED";
                break;
            }
        }
        System.out.println(answer);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<Integer> list = new ArrayList<>(n);
        for (int i = 0; i < n; i++) {
            list.add(Integer.parseInt(sc.next()));
        }
        String answer = "APPROVED";
        for (Integer i : list) {
            if ((i % 2) != 0) {
                continue;
            }
            if (((i % 3) == 0) || ((i % 5) == 0)) {
                answer = "APPROVED";
            } else {
                answer = "DENIED";
                break;
            }
        }
        System.out.println(answer);
        sc.close();
    } 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 ArrayList<Integer> list = new ArrayList<>(n); list new ArrayList<>(n) for (int i = 0; i < n; i++) {
            list.add(Integer.parseInt(sc.next()));
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            list.add(Integer.parseInt(sc.next()));
        } {
            list.add(Integer.parseInt(sc.next()));
        } list.add(Integer.parseInt(sc.next())) list.add list Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String answer = "APPROVED"; answer "APPROVED" for (Integer i : list) {
            if ((i % 2) != 0) {
                continue;
            }
            if (((i % 3) == 0) || ((i % 5) == 0)) {
                answer = "APPROVED";
            } else {
                answer = "DENIED";
                break;
            }
        } Integer i list {
            if ((i % 2) != 0) {
                continue;
            }
            if (((i % 3) == 0) || ((i % 5) == 0)) {
                answer = "APPROVED";
            } else {
                answer = "DENIED";
                break;
            }
        } {
            if ((i % 2) != 0) {
                continue;
            }
            if (((i % 3) == 0) || ((i % 5) == 0)) {
                answer = "APPROVED";
            } else {
                answer = "DENIED";
                break;
            }
        } if ((i % 2) != 0) {
                continue;
            } (i % 2) != 0 (i % 2) i 2 0 {
                continue;
            } continue; if (((i % 3) == 0) || ((i % 5) == 0)) {
                answer = "APPROVED";
            } else {
                answer = "DENIED";
                break;
            } ((i % 3) == 0) || ((i % 5) == 0) ((i % 3) == 0) (i % 3) i 3 0 ((i % 5) == 0) (i % 5) i 5 0 {
                answer = "APPROVED";
            } answer = "APPROVED" answer "APPROVED" {
                answer = "DENIED";
                break;
            } answer = "DENIED" answer "DENIED" break; System.out.println(answer) System.out.println System.out System System.out answer sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<Integer> list = new ArrayList<>(n);
        for (int i = 0; i < n; i++) {
            list.add(Integer.parseInt(sc.next()));
        }
        String answer = "APPROVED";
        for (Integer i : list) {
            if ((i % 2) != 0) {
                continue;
            }
            if (((i % 3) == 0) || ((i % 5) == 0)) {
                answer = "APPROVED";
            } else {
                answer = "DENIED";
                break;
            }
        }
        System.out.println(answer);
        sc.close();
    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<Integer> list = new ArrayList<>(n);
        for (int i = 0; i < n; i++) {
            list.add(Integer.parseInt(sc.next()));
        }
        String answer = "APPROVED";
        for (Integer i : list) {
            if ((i % 2) != 0) {
                continue;
            }
            if (((i % 3) == 0) || ((i % 5) == 0)) {
                answer = "APPROVED";
            } else {
                answer = "DENIED";
                break;
            }
        }
        System.out.println(answer);
        sc.close();
    }

} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        ArrayList<Integer> list = new ArrayList<>(n);
        for (int i = 0; i < n; i++) {
            list.add(Integer.parseInt(sc.next()));
        }
        String answer = "APPROVED";
        for (Integer i : list) {
            if ((i % 2) != 0) {
                continue;
            }
            if (((i % 3) == 0) || ((i % 5) == 0)) {
                answer = "APPROVED";
            } else {
                answer = "DENIED";
                break;
            }
        }
        System.out.println(answer);
        sc.close();
    }

}
