import java.util.Scanner;
class Main{
 public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   boolean flag = true;

   for(int i=0;i<n;i++) {
	   int a = sc.nextInt();
	   if(a%2==0&&((a%3)!=0)&&((a%5)!=0)) {
		   flag=false;
	   }
   }
   	System.out.println(flag?"APPROVED":"DENIED");
 }
} 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();
   boolean flag = true;

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

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

   for(int i=0;i<n;i++) {
	   int a = sc.nextInt();
	   if(a%2==0&&((a%3)!=0)&&((a%5)!=0)) {
		   flag=false;
	   }
   }
   	System.out.println(flag?"APPROVED":"DENIED");
 } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc boolean flag = true; flag true for(int i=0;i<n;i++) {
	   int a = sc.nextInt();
	   if(a%2==0&&((a%3)!=0)&&((a%5)!=0)) {
		   flag=false;
	   }
   } int i=0; int i=0; i 0 i<n i n i++ i++ i {
	   int a = sc.nextInt();
	   if(a%2==0&&((a%3)!=0)&&((a%5)!=0)) {
		   flag=false;
	   }
   } {
	   int a = sc.nextInt();
	   if(a%2==0&&((a%3)!=0)&&((a%5)!=0)) {
		   flag=false;
	   }
   } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc if(a%2==0&&((a%3)!=0)&&((a%5)!=0)) {
		   flag=false;
	   } a%2==0&&((a%3)!=0)&&((a%5)!=0) a%2==0&&((a%3)!=0)&&((a%5)!=0) a%2==0 a%2 a 2 0 ((a%3)!=0) (a%3) a 3 0 ((a%5)!=0) (a%5) a 5 0 {
		   flag=false;
	   } 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
import java.util.Scanner;
class Main{
 public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   boolean flag = true;

   for(int i=0;i<n;i++) {
	   int a = sc.nextInt();
	   if(a%2==0&&((a%3)!=0)&&((a%5)!=0)) {
		   flag=false;
	   }
   }
   	System.out.println(flag?"APPROVED":"DENIED");
 }
}