import java.math.*;
import java.util.*;
import java.lang.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        String ans = "DENIED";
        outloop:for(int i = 0;i<a.length;i++){
            a[i] = sc.nextInt();
            if(a[i]%2==0){
                if(a[i]%3==0||a[i]%5==0){
                    ans = "APPROVED";
                } else {
                    ans = "DENIED";
                    break outloop;
                }
            } else {
                ans = "APPROVED";
            }
        }
        System.out.println(ans);
    }
} import java.math.*; math.* java import java.util.*; util.* java import java.lang.*; lang.* java class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        String ans = "DENIED";
        outloop:for(int i = 0;i<a.length;i++){
            a[i] = sc.nextInt();
            if(a[i]%2==0){
                if(a[i]%3==0||a[i]%5==0){
                    ans = "APPROVED";
                } else {
                    ans = "DENIED";
                    break outloop;
                }
            } else {
                ans = "APPROVED";
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        String ans = "DENIED";
        outloop:for(int i = 0;i<a.length;i++){
            a[i] = sc.nextInt();
            if(a[i]%2==0){
                if(a[i]%3==0||a[i]%5==0){
                    ans = "APPROVED";
                } else {
                    ans = "DENIED";
                    break outloop;
                }
            } else {
                ans = "APPROVED";
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        String ans = "DENIED";
        outloop:for(int i = 0;i<a.length;i++){
            a[i] = sc.nextInt();
            if(a[i]%2==0){
                if(a[i]%3==0||a[i]%5==0){
                    ans = "APPROVED";
                } else {
                    ans = "DENIED";
                    break outloop;
                }
            } else {
                ans = "APPROVED";
            }
        }
        System.out.println(ans);
    } 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 String ans = "DENIED"; ans "DENIED" System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.math.*;
import java.util.*;
import java.lang.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        String ans = "DENIED";
        outloop:for(int i = 0;i<a.length;i++){
            a[i] = sc.nextInt();
            if(a[i]%2==0){
                if(a[i]%3==0||a[i]%5==0){
                    ans = "APPROVED";
                } else {
                    ans = "DENIED";
                    break outloop;
                }
            } else {
                ans = "APPROVED";
            }
        }
        System.out.println(ans);
    }
}
