import java.io.*;
import java.util.*;

/**
 * Created by Ayushi on 16 Feb 2020.
 * Problem:
 * Round:
 */

public class Main {
    public static void main(String[] args) throws IOException {
        StringTokenizer st;
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String temp = br.readLine();
        int n = Integer.parseInt(temp);

        temp = br.readLine();
        st = new StringTokenizer(temp, " ");
        int[] a = new int[n];
        int j = 0;
        boolean ans = true;
        while (st.hasMoreTokens() && ans) {
            a[j] = Integer.parseInt(st.nextToken());
            if (a[j] % 2 == 0) {
                if (a[j] % 3 != 0 && a[j] % 5 != 0) ans = false;
            }
        }
        br.close();
        System.out.println(ans ? "APPROVED":"DENIED");
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws IOException {
        StringTokenizer st;
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String temp = br.readLine();
        int n = Integer.parseInt(temp);

        temp = br.readLine();
        st = new StringTokenizer(temp, " ");
        int[] a = new int[n];
        int j = 0;
        boolean ans = true;
        while (st.hasMoreTokens() && ans) {
            a[j] = Integer.parseInt(st.nextToken());
            if (a[j] % 2 == 0) {
                if (a[j] % 3 != 0 && a[j] % 5 != 0) ans = false;
            }
        }
        br.close();
        System.out.println(ans ? "APPROVED":"DENIED");
    }
} Main public static void main(String[] args) throws IOException {
        StringTokenizer st;
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String temp = br.readLine();
        int n = Integer.parseInt(temp);

        temp = br.readLine();
        st = new StringTokenizer(temp, " ");
        int[] a = new int[n];
        int j = 0;
        boolean ans = true;
        while (st.hasMoreTokens() && ans) {
            a[j] = Integer.parseInt(st.nextToken());
            if (a[j] % 2 == 0) {
                if (a[j] % 3 != 0 && a[j] % 5 != 0) ans = false;
            }
        }
        br.close();
        System.out.println(ans ? "APPROVED":"DENIED");
    } main {
        StringTokenizer st;
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String temp = br.readLine();
        int n = Integer.parseInt(temp);

        temp = br.readLine();
        st = new StringTokenizer(temp, " ");
        int[] a = new int[n];
        int j = 0;
        boolean ans = true;
        while (st.hasMoreTokens() && ans) {
            a[j] = Integer.parseInt(st.nextToken());
            if (a[j] % 2 == 0) {
                if (a[j] % 3 != 0 && a[j] % 5 != 0) ans = false;
            }
        }
        br.close();
        System.out.println(ans ? "APPROVED":"DENIED");
    } StringTokenizer st; st BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String temp = br.readLine(); temp br.readLine() br.readLine br int n = Integer.parseInt(temp); n Integer.parseInt(temp) Integer.parseInt Integer temp temp = br.readLine() temp br.readLine() br.readLine br st = new StringTokenizer(temp, " ") st new StringTokenizer(temp, " ") int[] a = new int[n]; a new int[n] n int j = 0; j 0 boolean ans = true; ans true while (st.hasMoreTokens() && ans) {
            a[j] = Integer.parseInt(st.nextToken());
            if (a[j] % 2 == 0) {
                if (a[j] % 3 != 0 && a[j] % 5 != 0) ans = false;
            }
        } st.hasMoreTokens() && ans st.hasMoreTokens() st.hasMoreTokens st ans {
            a[j] = Integer.parseInt(st.nextToken());
            if (a[j] % 2 == 0) {
                if (a[j] % 3 != 0 && a[j] % 5 != 0) ans = false;
            }
        } a[j] = Integer.parseInt(st.nextToken()) a[j] a j Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st if (a[j] % 2 == 0) {
                if (a[j] % 3 != 0 && a[j] % 5 != 0) ans = false;
            } a[j] % 2 == 0 a[j] % 2 a[j] a j 2 0 {
                if (a[j] % 3 != 0 && a[j] % 5 != 0) ans = false;
            } if (a[j] % 3 != 0 && a[j] % 5 != 0) ans = false; a[j] % 3 != 0 && a[j] % 5 != 0 a[j] % 3 != 0 a[j] % 3 a[j] a j 3 0 a[j] % 5 != 0 a[j] % 5 a[j] a j 5 0 ans = false ans false br.close() br.close br System.out.println(ans ? "APPROVED":"DENIED") System.out.println System.out System System.out ans ? "APPROVED":"DENIED" ans "APPROVED" "DENIED" String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        StringTokenizer st;
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String temp = br.readLine();
        int n = Integer.parseInt(temp);

        temp = br.readLine();
        st = new StringTokenizer(temp, " ");
        int[] a = new int[n];
        int j = 0;
        boolean ans = true;
        while (st.hasMoreTokens() && ans) {
            a[j] = Integer.parseInt(st.nextToken());
            if (a[j] % 2 == 0) {
                if (a[j] % 3 != 0 && a[j] % 5 != 0) ans = false;
            }
        }
        br.close();
        System.out.println(ans ? "APPROVED":"DENIED");
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        StringTokenizer st;
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String temp = br.readLine();
        int n = Integer.parseInt(temp);

        temp = br.readLine();
        st = new StringTokenizer(temp, " ");
        int[] a = new int[n];
        int j = 0;
        boolean ans = true;
        while (st.hasMoreTokens() && ans) {
            a[j] = Integer.parseInt(st.nextToken());
            if (a[j] % 2 == 0) {
                if (a[j] % 3 != 0 && a[j] % 5 != 0) ans = false;
            }
        }
        br.close();
        System.out.println(ans ? "APPROVED":"DENIED");
    }
} Main
import java.io.*;
import java.util.*;

/**
 * Created by Ayushi on 16 Feb 2020.
 * Problem:
 * Round:
 */

public class Main {
    public static void main(String[] args) throws IOException {
        StringTokenizer st;
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String temp = br.readLine();
        int n = Integer.parseInt(temp);

        temp = br.readLine();
        st = new StringTokenizer(temp, " ");
        int[] a = new int[n];
        int j = 0;
        boolean ans = true;
        while (st.hasMoreTokens() && ans) {
            a[j] = Integer.parseInt(st.nextToken());
            if (a[j] % 2 == 0) {
                if (a[j] % 3 != 0 && a[j] % 5 != 0) ans = false;
            }
        }
        br.close();
        System.out.println(ans ? "APPROVED":"DENIED");
    }
}
