
// 問題URL
// https://atcoder.jp/contests/abc155/tasks/abc155_b

import java.util.*;
import java.lang.*;
import java.util.stream.*;

public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer a = Integer.parseInt(scanner.next());
        Integer[] b = new Integer[a];

        // 合計値
        List<Integer> total = new ArrayList<Integer>();

        boolean  flag = false;
        for(int i =0; i < a; i++) {
            b[i] = Integer.parseInt(scanner.next());
            if (b[i] % 2 == 0) total.add(b[i]);
        }

        for(int i =0; i < total.size(); i++) {
            if (!(total.get(i) % 3 == 0 || total.get(i) % 5 == 0)) {
                flag = true;
                break;
            }
        }

        if (flag) {
            System.out.println("DENIED");
        } else{
            System.out.println("APPROVED");
        }
    }
} import java.util.*; util.* java import java.lang.*; lang.* java import java.util.stream.*; stream.* java.util public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer a = Integer.parseInt(scanner.next());
        Integer[] b = new Integer[a];

        // 合計値
        List<Integer> total = new ArrayList<Integer>();

        boolean  flag = false;
        for(int i =0; i < a; i++) {
            b[i] = Integer.parseInt(scanner.next());
            if (b[i] % 2 == 0) total.add(b[i]);
        }

        for(int i =0; i < total.size(); i++) {
            if (!(total.get(i) % 3 == 0 || total.get(i) % 5 == 0)) {
                flag = true;
                break;
            }
        }

        if (flag) {
            System.out.println("DENIED");
        } else{
            System.out.println("APPROVED");
        }
    }
} Main public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer a = Integer.parseInt(scanner.next());
        Integer[] b = new Integer[a];

        // 合計値
        List<Integer> total = new ArrayList<Integer>();

        boolean  flag = false;
        for(int i =0; i < a; i++) {
            b[i] = Integer.parseInt(scanner.next());
            if (b[i] % 2 == 0) total.add(b[i]);
        }

        for(int i =0; i < total.size(); i++) {
            if (!(total.get(i) % 3 == 0 || total.get(i) % 5 == 0)) {
                flag = true;
                break;
            }
        }

        if (flag) {
            System.out.println("DENIED");
        } else{
            System.out.println("APPROVED");
        }
    } main {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer a = Integer.parseInt(scanner.next());
        Integer[] b = new Integer[a];

        // 合計値
        List<Integer> total = new ArrayList<Integer>();

        boolean  flag = false;
        for(int i =0; i < a; i++) {
            b[i] = Integer.parseInt(scanner.next());
            if (b[i] % 2 == 0) total.add(b[i]);
        }

        for(int i =0; i < total.size(); i++) {
            if (!(total.get(i) % 3 == 0 || total.get(i) % 5 == 0)) {
                flag = true;
                break;
            }
        }

        if (flag) {
            System.out.println("DENIED");
        } else{
            System.out.println("APPROVED");
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) Integer a = Integer.parseInt(scanner.next()); a Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner Integer[] b = new Integer[a]; b new Integer[a] a List<Integer> total = new ArrayList<Integer>(); total new ArrayList<Integer>() boolean  flag = false; flag false for(int i =0; i < a; i++) {
            b[i] = Integer.parseInt(scanner.next());
            if (b[i] % 2 == 0) total.add(b[i]);
        } int i =0; int i =0; i 0 i < a i a i++ i++ i {
            b[i] = Integer.parseInt(scanner.next());
            if (b[i] % 2 == 0) total.add(b[i]);
        } {
            b[i] = Integer.parseInt(scanner.next());
            if (b[i] % 2 == 0) total.add(b[i]);
        } b[i] = Integer.parseInt(scanner.next()) b[i] b i Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner if (b[i] % 2 == 0) total.add(b[i]); b[i] % 2 == 0 b[i] % 2 b[i] b i 2 0 total.add(b[i]) total.add total b[i] b i for(int i =0; i < total.size(); i++) {
            if (!(total.get(i) % 3 == 0 || total.get(i) % 5 == 0)) {
                flag = true;
                break;
            }
        } int i =0; int i =0; i 0 i < total.size() i total.size() total.size total i++ i++ i {
            if (!(total.get(i) % 3 == 0 || total.get(i) % 5 == 0)) {
                flag = true;
                break;
            }
        } {
            if (!(total.get(i) % 3 == 0 || total.get(i) % 5 == 0)) {
                flag = true;
                break;
            }
        } if (!(total.get(i) % 3 == 0 || total.get(i) % 5 == 0)) {
                flag = true;
                break;
            } !(total.get(i) % 3 == 0 || total.get(i) % 5 == 0) (total.get(i) % 3 == 0 || total.get(i) % 5 == 0) total.get(i) % 3 == 0 total.get(i) % 3 total.get(i) total.get total i 3 0 total.get(i) % 5 == 0 total.get(i) % 5 total.get(i) total.get total i 5 0 {
                flag = true;
                break;
            } flag = true flag true break; if (flag) {
            System.out.println("DENIED");
        } else{
            System.out.println("APPROVED");
        } flag {
            System.out.println("DENIED");
        } System.out.println("DENIED") System.out.println System.out System System.out "DENIED" {
            System.out.println("APPROVED");
        } System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" String[] args args public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer a = Integer.parseInt(scanner.next());
        Integer[] b = new Integer[a];

        // 合計値
        List<Integer> total = new ArrayList<Integer>();

        boolean  flag = false;
        for(int i =0; i < a; i++) {
            b[i] = Integer.parseInt(scanner.next());
            if (b[i] % 2 == 0) total.add(b[i]);
        }

        for(int i =0; i < total.size(); i++) {
            if (!(total.get(i) % 3 == 0 || total.get(i) % 5 == 0)) {
                flag = true;
                break;
            }
        }

        if (flag) {
            System.out.println("DENIED");
        } else{
            System.out.println("APPROVED");
        }
    }
} public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer a = Integer.parseInt(scanner.next());
        Integer[] b = new Integer[a];

        // 合計値
        List<Integer> total = new ArrayList<Integer>();

        boolean  flag = false;
        for(int i =0; i < a; i++) {
            b[i] = Integer.parseInt(scanner.next());
            if (b[i] % 2 == 0) total.add(b[i]);
        }

        for(int i =0; i < total.size(); i++) {
            if (!(total.get(i) % 3 == 0 || total.get(i) % 5 == 0)) {
                flag = true;
                break;
            }
        }

        if (flag) {
            System.out.println("DENIED");
        } else{
            System.out.println("APPROVED");
        }
    }
} Main

// 問題URL
// https://atcoder.jp/contests/abc155/tasks/abc155_b

import java.util.*;
import java.lang.*;
import java.util.stream.*;

public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer a = Integer.parseInt(scanner.next());
        Integer[] b = new Integer[a];

        // 合計値
        List<Integer> total = new ArrayList<Integer>();

        boolean  flag = false;
        for(int i =0; i < a; i++) {
            b[i] = Integer.parseInt(scanner.next());
            if (b[i] % 2 == 0) total.add(b[i]);
        }

        for(int i =0; i < total.size(); i++) {
            if (!(total.get(i) % 3 == 0 || total.get(i) % 5 == 0)) {
                flag = true;
                break;
            }
        }

        if (flag) {
            System.out.println("DENIED");
        } else{
            System.out.println("APPROVED");
        }
    }
}