import java.util.*;
import javax.lang.model.util.ElementScanner6;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        // 入力
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }

        // 処理
        String out = "APPROVED";
        for (int i = 0; i < n; i++) {
            if (a[i] % 2 == 0) {
                if (!(a[i] % 3 == 0 || a[i] % 5 == 0)) {
                    out = "DENIED";
                    break;
                }
            }
        }

        // 出力
        System.out.println(out);
    }

} import java.util.*; util.* java import javax.lang.model.util.ElementScanner6; ElementScanner6 javax.lang.model.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        // 入力
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }

        // 処理
        String out = "APPROVED";
        for (int i = 0; i < n; i++) {
            if (a[i] % 2 == 0) {
                if (!(a[i] % 3 == 0 || a[i] % 5 == 0)) {
                    out = "DENIED";
                    break;
                }
            }
        }

        // 出力
        System.out.println(out);
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        // 入力
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }

        // 処理
        String out = "APPROVED";
        for (int i = 0; i < n; i++) {
            if (a[i] % 2 == 0) {
                if (!(a[i] % 3 == 0 || a[i] % 5 == 0)) {
                    out = "DENIED";
                    break;
                }
            }
        }

        // 出力
        System.out.println(out);
    } main {
        Scanner sc = new Scanner(System.in);

        // 入力
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }

        // 処理
        String out = "APPROVED";
        for (int i = 0; i < n; i++) {
            if (a[i] % 2 == 0) {
                if (!(a[i] % 3 == 0 || a[i] % 5 == 0)) {
                    out = "DENIED";
                    break;
                }
            }
        }

        // 出力
        System.out.println(out);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            a[i] = sc.nextInt();
        } {
            a[i] = sc.nextInt();
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc String out = "APPROVED"; out "APPROVED" for (int i = 0; i < n; i++) {
            if (a[i] % 2 == 0) {
                if (!(a[i] % 3 == 0 || a[i] % 5 == 0)) {
                    out = "DENIED";
                    break;
                }
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (a[i] % 2 == 0) {
                if (!(a[i] % 3 == 0 || a[i] % 5 == 0)) {
                    out = "DENIED";
                    break;
                }
            }
        } {
            if (a[i] % 2 == 0) {
                if (!(a[i] % 3 == 0 || a[i] % 5 == 0)) {
                    out = "DENIED";
                    break;
                }
            }
        } if (a[i] % 2 == 0) {
                if (!(a[i] % 3 == 0 || a[i] % 5 == 0)) {
                    out = "DENIED";
                    break;
                }
            } a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 {
                if (!(a[i] % 3 == 0 || a[i] % 5 == 0)) {
                    out = "DENIED";
                    break;
                }
            } if (!(a[i] % 3 == 0 || a[i] % 5 == 0)) {
                    out = "DENIED";
                    break;
                } !(a[i] % 3 == 0 || a[i] % 5 == 0) (a[i] % 3 == 0 || a[i] % 5 == 0) a[i] % 3 == 0 a[i] % 3 a[i] a i 3 0 a[i] % 5 == 0 a[i] % 5 a[i] a i 5 0 {
                    out = "DENIED";
                    break;
                } out = "DENIED" out "DENIED" break; System.out.println(out) System.out.println System.out System System.out out String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        // 入力
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }

        // 処理
        String out = "APPROVED";
        for (int i = 0; i < n; i++) {
            if (a[i] % 2 == 0) {
                if (!(a[i] % 3 == 0 || a[i] % 5 == 0)) {
                    out = "DENIED";
                    break;
                }
            }
        }

        // 出力
        System.out.println(out);
    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        // 入力
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }

        // 処理
        String out = "APPROVED";
        for (int i = 0; i < n; i++) {
            if (a[i] % 2 == 0) {
                if (!(a[i] % 3 == 0 || a[i] % 5 == 0)) {
                    out = "DENIED";
                    break;
                }
            }
        }

        // 出力
        System.out.println(out);
    }

} Main
import java.util.*;
import javax.lang.model.util.ElementScanner6;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        // 入力
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }

        // 処理
        String out = "APPROVED";
        for (int i = 0; i < n; i++) {
            if (a[i] % 2 == 0) {
                if (!(a[i] % 3 == 0 || a[i] % 5 == 0)) {
                    out = "DENIED";
                    break;
                }
            }
        }

        // 出力
        System.out.println(out);
    }

}