import java.util.Scanner;

public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = 0; 
		boolean flag = true;
		
		for(int i = 0; i < n; i++){
			x = scan.nextInt();
			if(x%2 == 0)
				if(x%3 != 0 && x%5 != 0)
					flag = false;
		}
		
		System.out.println(flag?"APPROVED":"DENIED");
		
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = 0; 
		boolean flag = true;
		
		for(int i = 0; i < n; i++){
			x = scan.nextInt();
			if(x%2 == 0)
				if(x%3 != 0 && x%5 != 0)
					flag = false;
		}
		
		System.out.println(flag?"APPROVED":"DENIED");
		
	}
} Main public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = 0; 
		boolean flag = true;
		
		for(int i = 0; i < n; i++){
			x = scan.nextInt();
			if(x%2 == 0)
				if(x%3 != 0 && x%5 != 0)
					flag = false;
		}
		
		System.out.println(flag?"APPROVED":"DENIED");
		
	} main {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = 0; 
		boolean flag = true;
		
		for(int i = 0; i < n; i++){
			x = scan.nextInt();
			if(x%2 == 0)
				if(x%3 != 0 && x%5 != 0)
					flag = false;
		}
		
		System.out.println(flag?"APPROVED":"DENIED");
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int x = 0; x 0 boolean flag = true; flag true for(int i = 0; i < n; i++){
			x = scan.nextInt();
			if(x%2 == 0)
				if(x%3 != 0 && x%5 != 0)
					flag = false;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			x = scan.nextInt();
			if(x%2 == 0)
				if(x%3 != 0 && x%5 != 0)
					flag = false;
		} {
			x = scan.nextInt();
			if(x%2 == 0)
				if(x%3 != 0 && x%5 != 0)
					flag = false;
		} x = scan.nextInt() x scan.nextInt() scan.nextInt scan if(x%2 == 0)
				if(x%3 != 0 && x%5 != 0)
					flag = false; x%2 == 0 x%2 x 2 0 if(x%3 != 0 && x%5 != 0)
					flag = false; x%3 != 0 && x%5 != 0 x%3 != 0 x%3 x 3 0 x%5 != 0 x%5 x 5 0 flag = false flag false System.out.println(flag?"APPROVED":"DENIED") System.out.println System.out System System.out flag?"APPROVED":"DENIED" flag "APPROVED" "DENIED" String args[] args public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = 0; 
		boolean flag = true;
		
		for(int i = 0; i < n; i++){
			x = scan.nextInt();
			if(x%2 == 0)
				if(x%3 != 0 && x%5 != 0)
					flag = false;
		}
		
		System.out.println(flag?"APPROVED":"DENIED");
		
	}
} public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = 0; 
		boolean flag = true;
		
		for(int i = 0; i < n; i++){
			x = scan.nextInt();
			if(x%2 == 0)
				if(x%3 != 0 && x%5 != 0)
					flag = false;
		}
		
		System.out.println(flag?"APPROVED":"DENIED");
		
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int x = 0; 
		boolean flag = true;
		
		for(int i = 0; i < n; i++){
			x = scan.nextInt();
			if(x%2 == 0)
				if(x%3 != 0 && x%5 != 0)
					flag = false;
		}
		
		System.out.println(flag?"APPROVED":"DENIED");
		
	}
}