import java.util.Scanner;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] num = new int[N];
		String judge = "APPROVED";
		for(int i = 0; i < N; i++){
			num[i] = sc.nextInt();
			if(num[i] % 2 == 0){
				if((num[i] % 3 != 0) && (num[i] % 5 != 0)){
					judge = "DENIED";
				}
			}
		}
		System.out.println(judge);
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] num = new int[N];
		String judge = "APPROVED";
		for(int i = 0; i < N; i++){
			num[i] = sc.nextInt();
			if(num[i] % 2 == 0){
				if((num[i] % 3 != 0) && (num[i] % 5 != 0)){
					judge = "DENIED";
				}
			}
		}
		System.out.println(judge);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] num = new int[N];
		String judge = "APPROVED";
		for(int i = 0; i < N; i++){
			num[i] = sc.nextInt();
			if(num[i] % 2 == 0){
				if((num[i] % 3 != 0) && (num[i] % 5 != 0)){
					judge = "DENIED";
				}
			}
		}
		System.out.println(judge);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] num = new int[N];
		String judge = "APPROVED";
		for(int i = 0; i < N; i++){
			num[i] = sc.nextInt();
			if(num[i] % 2 == 0){
				if((num[i] % 3 != 0) && (num[i] % 5 != 0)){
					judge = "DENIED";
				}
			}
		}
		System.out.println(judge);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] num = new int[N]; num new int[N] N String judge = "APPROVED"; judge "APPROVED" for(int i = 0; i < N; i++){
			num[i] = sc.nextInt();
			if(num[i] % 2 == 0){
				if((num[i] % 3 != 0) && (num[i] % 5 != 0)){
					judge = "DENIED";
				}
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			num[i] = sc.nextInt();
			if(num[i] % 2 == 0){
				if((num[i] % 3 != 0) && (num[i] % 5 != 0)){
					judge = "DENIED";
				}
			}
		} {
			num[i] = sc.nextInt();
			if(num[i] % 2 == 0){
				if((num[i] % 3 != 0) && (num[i] % 5 != 0)){
					judge = "DENIED";
				}
			}
		} num[i] = sc.nextInt() num[i] num i sc.nextInt() sc.nextInt sc if(num[i] % 2 == 0){
				if((num[i] % 3 != 0) && (num[i] % 5 != 0)){
					judge = "DENIED";
				}
			} num[i] % 2 == 0 num[i] % 2 num[i] num i 2 0 {
				if((num[i] % 3 != 0) && (num[i] % 5 != 0)){
					judge = "DENIED";
				}
			} if((num[i] % 3 != 0) && (num[i] % 5 != 0)){
					judge = "DENIED";
				} (num[i] % 3 != 0) && (num[i] % 5 != 0) (num[i] % 3 != 0) num[i] % 3 num[i] num i 3 0 (num[i] % 5 != 0) num[i] % 5 num[i] num i 5 0 {
					judge = "DENIED";
				} judge = "DENIED" judge "DENIED" System.out.println(judge) System.out.println System.out System System.out judge String[] args args
import java.util.Scanner;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] num = new int[N];
		String judge = "APPROVED";
		for(int i = 0; i < N; i++){
			num[i] = sc.nextInt();
			if(num[i] % 2 == 0){
				if((num[i] % 3 != 0) && (num[i] % 5 != 0)){
					judge = "DENIED";
				}
			}
		}
		System.out.println(judge);
	}
}