import java.util.Scanner;

public class Main{
 public static void main(String[] args){

   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   int str[] = new int[N];
   boolean flag = true;
   for(int i=0; i<N; i++) {
	   str[i] = sc.nextInt();
      }

   for(int i=0; i<N; i++) {
	if(str[i] % 2 == 0) {
		boolean flag1 = false;
		if(str[i] % 3 == 0) {
			flag1 = true;
		}
			if(str[i] % 5 == 0) {
			flag1 = true;
			}

			if(flag1 == false) {
				flag = false;
				break;
			}

			}
		}

   if(flag == true) {
   System.out.print("APPROVED");
   }else {
   System.out.print("DENIED");

   }




   }

   }
 import java.util.Scanner; Scanner java.util public class Main{
 public static void main(String[] args){

   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   int str[] = new int[N];
   boolean flag = true;
   for(int i=0; i<N; i++) {
	   str[i] = sc.nextInt();
      }

   for(int i=0; i<N; i++) {
	if(str[i] % 2 == 0) {
		boolean flag1 = false;
		if(str[i] % 3 == 0) {
			flag1 = true;
		}
			if(str[i] % 5 == 0) {
			flag1 = true;
			}

			if(flag1 == false) {
				flag = false;
				break;
			}

			}
		}

   if(flag == true) {
   System.out.print("APPROVED");
   }else {
   System.out.print("DENIED");

   }




   }

   } Main public static void main(String[] args){

   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   int str[] = new int[N];
   boolean flag = true;
   for(int i=0; i<N; i++) {
	   str[i] = sc.nextInt();
      }

   for(int i=0; i<N; i++) {
	if(str[i] % 2 == 0) {
		boolean flag1 = false;
		if(str[i] % 3 == 0) {
			flag1 = true;
		}
			if(str[i] % 5 == 0) {
			flag1 = true;
			}

			if(flag1 == false) {
				flag = false;
				break;
			}

			}
		}

   if(flag == true) {
   System.out.print("APPROVED");
   }else {
   System.out.print("DENIED");

   }




   } main {

   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   int str[] = new int[N];
   boolean flag = true;
   for(int i=0; i<N; i++) {
	   str[i] = sc.nextInt();
      }

   for(int i=0; i<N; i++) {
	if(str[i] % 2 == 0) {
		boolean flag1 = false;
		if(str[i] % 3 == 0) {
			flag1 = true;
		}
			if(str[i] % 5 == 0) {
			flag1 = true;
			}

			if(flag1 == false) {
				flag = false;
				break;
			}

			}
		}

   if(flag == true) {
   System.out.print("APPROVED");
   }else {
   System.out.print("DENIED");

   }




   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int str[] = new int[N]; str new int[N] N boolean flag = true; flag true for(int i=0; i<N; i++) {
	   str[i] = sc.nextInt();
      } int i=0; int i=0; i 0 i<N i N i++ i++ i {
	   str[i] = sc.nextInt();
      } {
	   str[i] = sc.nextInt();
      } str[i] = sc.nextInt() str[i] str i sc.nextInt() sc.nextInt sc for(int i=0; i<N; i++) {
	if(str[i] % 2 == 0) {
		boolean flag1 = false;
		if(str[i] % 3 == 0) {
			flag1 = true;
		}
			if(str[i] % 5 == 0) {
			flag1 = true;
			}

			if(flag1 == false) {
				flag = false;
				break;
			}

			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
	if(str[i] % 2 == 0) {
		boolean flag1 = false;
		if(str[i] % 3 == 0) {
			flag1 = true;
		}
			if(str[i] % 5 == 0) {
			flag1 = true;
			}

			if(flag1 == false) {
				flag = false;
				break;
			}

			}
		} {
	if(str[i] % 2 == 0) {
		boolean flag1 = false;
		if(str[i] % 3 == 0) {
			flag1 = true;
		}
			if(str[i] % 5 == 0) {
			flag1 = true;
			}

			if(flag1 == false) {
				flag = false;
				break;
			}

			}
		} if(str[i] % 2 == 0) {
		boolean flag1 = false;
		if(str[i] % 3 == 0) {
			flag1 = true;
		}
			if(str[i] % 5 == 0) {
			flag1 = true;
			}

			if(flag1 == false) {
				flag = false;
				break;
			}

			} str[i] % 2 == 0 str[i] % 2 str[i] str i 2 0 {
		boolean flag1 = false;
		if(str[i] % 3 == 0) {
			flag1 = true;
		}
			if(str[i] % 5 == 0) {
			flag1 = true;
			}

			if(flag1 == false) {
				flag = false;
				break;
			}

			} boolean flag1 = false; flag1 false if(str[i] % 3 == 0) {
			flag1 = true;
		} str[i] % 3 == 0 str[i] % 3 str[i] str i 3 0 {
			flag1 = true;
		} flag1 = true flag1 true if(str[i] % 5 == 0) {
			flag1 = true;
			} str[i] % 5 == 0 str[i] % 5 str[i] str i 5 0 {
			flag1 = true;
			} flag1 = true flag1 true if(flag1 == false) {
				flag = false;
				break;
			} flag1 == false flag1 false {
				flag = false;
				break;
			} flag = false flag false break; if(flag == true) {
   System.out.print("APPROVED");
   }else {
   System.out.print("DENIED");

   } flag == true flag true {
   System.out.print("APPROVED");
   } System.out.print("APPROVED") System.out.print System.out System System.out "APPROVED" {
   System.out.print("DENIED");

   } System.out.print("DENIED") System.out.print System.out System System.out "DENIED" String[] args args public class Main{
 public static void main(String[] args){

   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   int str[] = new int[N];
   boolean flag = true;
   for(int i=0; i<N; i++) {
	   str[i] = sc.nextInt();
      }

   for(int i=0; i<N; i++) {
	if(str[i] % 2 == 0) {
		boolean flag1 = false;
		if(str[i] % 3 == 0) {
			flag1 = true;
		}
			if(str[i] % 5 == 0) {
			flag1 = true;
			}

			if(flag1 == false) {
				flag = false;
				break;
			}

			}
		}

   if(flag == true) {
   System.out.print("APPROVED");
   }else {
   System.out.print("DENIED");

   }




   }

   } public class Main{
 public static void main(String[] args){

   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   int str[] = new int[N];
   boolean flag = true;
   for(int i=0; i<N; i++) {
	   str[i] = sc.nextInt();
      }

   for(int i=0; i<N; i++) {
	if(str[i] % 2 == 0) {
		boolean flag1 = false;
		if(str[i] % 3 == 0) {
			flag1 = true;
		}
			if(str[i] % 5 == 0) {
			flag1 = true;
			}

			if(flag1 == false) {
				flag = false;
				break;
			}

			}
		}

   if(flag == true) {
   System.out.print("APPROVED");
   }else {
   System.out.print("DENIED");

   }




   }

   } Main
import java.util.Scanner;

public class Main{
 public static void main(String[] args){

   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   int str[] = new int[N];
   boolean flag = true;
   for(int i=0; i<N; i++) {
	   str[i] = sc.nextInt();
      }

   for(int i=0; i<N; i++) {
	if(str[i] % 2 == 0) {
		boolean flag1 = false;
		if(str[i] % 3 == 0) {
			flag1 = true;
		}
			if(str[i] % 5 == 0) {
			flag1 = true;
			}

			if(flag1 == false) {
				flag = false;
				break;
			}

			}
		}

   if(flag == true) {
   System.out.print("APPROVED");
   }else {
   System.out.print("DENIED");

   }




   }

   }

