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