import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        String s = sc.nextLine();

        String[] vals = s.split(" ");
        String out = "APPROVED";
        for (int i = 0; i < vals.length; i++) {
            int x = Integer.parseInt(vals[i]);
            if (x % 2 == 0) {
                if (x % 3 != 0 && x % 5 != 0) {
                    out = "DENIED";
                    break;
                }
            }
        }
        System.out.println(out);
    }
} 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.nextLine());
        String s = sc.nextLine();

        String[] vals = s.split(" ");
        String out = "APPROVED";
        for (int i = 0; i < vals.length; i++) {
            int x = Integer.parseInt(vals[i]);
            if (x % 2 == 0) {
                if (x % 3 != 0 && x % 5 != 0) {
                    out = "DENIED";
                    break;
                }
            }
        }
        System.out.println(out);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        String s = sc.nextLine();

        String[] vals = s.split(" ");
        String out = "APPROVED";
        for (int i = 0; i < vals.length; i++) {
            int x = Integer.parseInt(vals[i]);
            if (x % 2 == 0) {
                if (x % 3 != 0 && x % 5 != 0) {
                    out = "DENIED";
                    break;
                }
            }
        }
        System.out.println(out);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        String s = sc.nextLine();

        String[] vals = s.split(" ");
        String out = "APPROVED";
        for (int i = 0; i < vals.length; i++) {
            int x = Integer.parseInt(vals[i]);
            if (x % 2 == 0) {
                if (x % 3 != 0 && x % 5 != 0) {
                    out = "DENIED";
                    break;
                }
            }
        }
        System.out.println(out);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.nextLine()); N Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String[] vals = s.split(" "); vals s.split(" ") s.split s " " String out = "APPROVED"; out "APPROVED" for (int i = 0; i < vals.length; i++) {
            int x = Integer.parseInt(vals[i]);
            if (x % 2 == 0) {
                if (x % 3 != 0 && x % 5 != 0) {
                    out = "DENIED";
                    break;
                }
            }
        } int i = 0; int i = 0; i 0 i < vals.length i vals.length vals vals.length i++ i++ i {
            int x = Integer.parseInt(vals[i]);
            if (x % 2 == 0) {
                if (x % 3 != 0 && x % 5 != 0) {
                    out = "DENIED";
                    break;
                }
            }
        } {
            int x = Integer.parseInt(vals[i]);
            if (x % 2 == 0) {
                if (x % 3 != 0 && x % 5 != 0) {
                    out = "DENIED";
                    break;
                }
            }
        } int x = Integer.parseInt(vals[i]); x Integer.parseInt(vals[i]) Integer.parseInt Integer vals[i] vals i if (x % 2 == 0) {
                if (x % 3 != 0 && x % 5 != 0) {
                    out = "DENIED";
                    break;
                }
            } x % 2 == 0 x % 2 x 2 0 {
                if (x % 3 != 0 && x % 5 != 0) {
                    out = "DENIED";
                    break;
                }
            } if (x % 3 != 0 && x % 5 != 0) {
                    out = "DENIED";
                    break;
                } x % 3 != 0 && x % 5 != 0 x % 3 != 0 x % 3 x 3 0 x % 5 != 0 x % 5 x 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 = Integer.parseInt(sc.nextLine());
        String s = sc.nextLine();

        String[] vals = s.split(" ");
        String out = "APPROVED";
        for (int i = 0; i < vals.length; i++) {
            int x = Integer.parseInt(vals[i]);
            if (x % 2 == 0) {
                if (x % 3 != 0 && x % 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 = Integer.parseInt(sc.nextLine());
        String s = sc.nextLine();

        String[] vals = s.split(" ");
        String out = "APPROVED";
        for (int i = 0; i < vals.length; i++) {
            int x = Integer.parseInt(vals[i]);
            if (x % 2 == 0) {
                if (x % 3 != 0 && x % 5 != 0) {
                    out = "DENIED";
                    break;
                }
            }
        }
        System.out.println(out);
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        String s = sc.nextLine();

        String[] vals = s.split(" ");
        String out = "APPROVED";
        for (int i = 0; i < vals.length; i++) {
            int x = Integer.parseInt(vals[i]);
            if (x % 2 == 0) {
                if (x % 3 != 0 && x % 5 != 0) {
                    out = "DENIED";
                    break;
                }
            }
        }
        System.out.println(out);
    }
}