import java.util.*;

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

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