    import javax.swing.*;
    import java.util.*;
    import java.io.*;


    public class Main {
        public static class FastReader {
            BufferedReader br;
            StringTokenizer st;

            public FastReader() {
                br = new BufferedReader(new InputStreamReader(System.in));
            }

            String nextLine() {
                String str = "";
                try {
                    str = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return str;
            }

            int nextInt() {
                return Integer.parseInt(next());
            }

            long nextLong() {
                return Long.parseLong(next());
            }

            double nextDouble() {
                return Double.parseDouble(next());
            }

            String next() {
                while (st == null || !st.hasMoreElements()) {
                    try {
                        st = new StringTokenizer(br.readLine());
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            }


        }
        public class pair {
            int a;
            int b;

            pair(int p, int q) {
                a = p;
                b = q;
            }
            public int hashCode() {
                return new Integer(a).hashCode() * 31 + new Integer(b).hashCode();
            }
        }

        public static int gcd(int a, int b) {
            if (a == 1 || b == 1)
                return 1;
            if (a == 0)
                return b;
            if (b == 0)
                return a;
            return gcd(b % a, a);
        }






        public static void main(String[] args) {
            FastReader s=new FastReader();
            int a=s.nextInt();
           int[] arr=new int[a];
           for(int i=0;i<a;i++)
           {
               arr[i]=s.nextInt();
           }
           int flag=0;
           for(int i=0;i<a;i++)
           {
               if(arr[i]%2==0)
               {
                   if(arr[i]%3!=0 && arr[i]%5!=0)
                   {
                       flag=1;
                       break;
                   }
               }
           }
           if(flag==0)
               System.out.println("APPROVED");
           else
               System.out.println("DENIED");
        }
        




    }






 import javax.swing.*; swing.* javax import java.util.*; util.* java import java.io.*; io.* java public class Main {
        public static class FastReader {
            BufferedReader br;
            StringTokenizer st;

            public FastReader() {
                br = new BufferedReader(new InputStreamReader(System.in));
            }

            String nextLine() {
                String str = "";
                try {
                    str = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return str;
            }

            int nextInt() {
                return Integer.parseInt(next());
            }

            long nextLong() {
                return Long.parseLong(next());
            }

            double nextDouble() {
                return Double.parseDouble(next());
            }

            String next() {
                while (st == null || !st.hasMoreElements()) {
                    try {
                        st = new StringTokenizer(br.readLine());
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            }


        }
        public class pair {
            int a;
            int b;

            pair(int p, int q) {
                a = p;
                b = q;
            }
            public int hashCode() {
                return new Integer(a).hashCode() * 31 + new Integer(b).hashCode();
            }
        }

        public static int gcd(int a, int b) {
            if (a == 1 || b == 1)
                return 1;
            if (a == 0)
                return b;
            if (b == 0)
                return a;
            return gcd(b % a, a);
        }






        public static void main(String[] args) {
            FastReader s=new FastReader();
            int a=s.nextInt();
           int[] arr=new int[a];
           for(int i=0;i<a;i++)
           {
               arr[i]=s.nextInt();
           }
           int flag=0;
           for(int i=0;i<a;i++)
           {
               if(arr[i]%2==0)
               {
                   if(arr[i]%3!=0 && arr[i]%5!=0)
                   {
                       flag=1;
                       break;
                   }
               }
           }
           if(flag==0)
               System.out.println("APPROVED");
           else
               System.out.println("DENIED");
        }
        




    } Main public static int gcd(int a, int b) {
            if (a == 1 || b == 1)
                return 1;
            if (a == 0)
                return b;
            if (b == 0)
                return a;
            return gcd(b % a, a);
        } gcd {
            if (a == 1 || b == 1)
                return 1;
            if (a == 0)
                return b;
            if (b == 0)
                return a;
            return gcd(b % a, a);
        } if (a == 1 || b == 1)
                return 1; a == 1 || b == 1 a == 1 a 1 b == 1 b 1 return 1; 1 if (a == 0)
                return b; a == 0 a 0 return b; b if (b == 0)
                return a; b == 0 b 0 return a; a return gcd(b % a, a); gcd(b % a, a) gcd b % a b a a int a a int b b public static void main(String[] args) {
            FastReader s=new FastReader();
            int a=s.nextInt();
           int[] arr=new int[a];
           for(int i=0;i<a;i++)
           {
               arr[i]=s.nextInt();
           }
           int flag=0;
           for(int i=0;i<a;i++)
           {
               if(arr[i]%2==0)
               {
                   if(arr[i]%3!=0 && arr[i]%5!=0)
                   {
                       flag=1;
                       break;
                   }
               }
           }
           if(flag==0)
               System.out.println("APPROVED");
           else
               System.out.println("DENIED");
        } main {
            FastReader s=new FastReader();
            int a=s.nextInt();
           int[] arr=new int[a];
           for(int i=0;i<a;i++)
           {
               arr[i]=s.nextInt();
           }
           int flag=0;
           for(int i=0;i<a;i++)
           {
               if(arr[i]%2==0)
               {
                   if(arr[i]%3!=0 && arr[i]%5!=0)
                   {
                       flag=1;
                       break;
                   }
               }
           }
           if(flag==0)
               System.out.println("APPROVED");
           else
               System.out.println("DENIED");
        } FastReader s=new FastReader(); s new FastReader() int a=s.nextInt(); a s.nextInt() s.nextInt s int[] arr=new int[a]; arr new int[a] a for(int i=0;i<a;i++)
           {
               arr[i]=s.nextInt();
           } int i=0; int i=0; i 0 i<a i a i++ i++ i {
               arr[i]=s.nextInt();
           } {
               arr[i]=s.nextInt();
           } arr[i]=s.nextInt() arr[i] arr i s.nextInt() s.nextInt s int flag=0; flag 0 for(int i=0;i<a;i++)
           {
               if(arr[i]%2==0)
               {
                   if(arr[i]%3!=0 && arr[i]%5!=0)
                   {
                       flag=1;
                       break;
                   }
               }
           } int i=0; int i=0; i 0 i<a i a i++ i++ i {
               if(arr[i]%2==0)
               {
                   if(arr[i]%3!=0 && arr[i]%5!=0)
                   {
                       flag=1;
                       break;
                   }
               }
           } {
               if(arr[i]%2==0)
               {
                   if(arr[i]%3!=0 && arr[i]%5!=0)
                   {
                       flag=1;
                       break;
                   }
               }
           } if(arr[i]%2==0)
               {
                   if(arr[i]%3!=0 && arr[i]%5!=0)
                   {
                       flag=1;
                       break;
                   }
               } arr[i]%2==0 arr[i]%2 arr[i] arr i 2 0 {
                   if(arr[i]%3!=0 && arr[i]%5!=0)
                   {
                       flag=1;
                       break;
                   }
               } if(arr[i]%3!=0 && arr[i]%5!=0)
                   {
                       flag=1;
                       break;
                   } arr[i]%3!=0 && arr[i]%5!=0 arr[i]%3!=0 arr[i]%3 arr[i] arr i 3 0 arr[i]%5!=0 arr[i]%5 arr[i] arr i 5 0 {
                       flag=1;
                       break;
                   } flag=1 flag 1 break; if(flag==0)
               System.out.println("APPROVED");
           else
               System.out.println("DENIED"); flag==0 flag 0 System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" System.out.println("DENIED") System.out.println System.out System System.out "DENIED" String[] args args public static class FastReader {
            BufferedReader br;
            StringTokenizer st;

            public FastReader() {
                br = new BufferedReader(new InputStreamReader(System.in));
            }

            String nextLine() {
                String str = "";
                try {
                    str = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return str;
            }

            int nextInt() {
                return Integer.parseInt(next());
            }

            long nextLong() {
                return Long.parseLong(next());
            }

            double nextDouble() {
                return Double.parseDouble(next());
            }

            String next() {
                while (st == null || !st.hasMoreElements()) {
                    try {
                        st = new StringTokenizer(br.readLine());
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            }


        } FastReader BufferedReader br; br StringTokenizer st; st public FastReader() {
                br = new BufferedReader(new InputStreamReader(System.in));
            } FastReader {
                br = new BufferedReader(new InputStreamReader(System.in));
            } br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String nextLine() {
                String str = "";
                try {
                    str = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return str;
            } nextLine {
                String str = "";
                try {
                    str = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return str;
            } String str = ""; str "" try {
                    str = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    str = br.readLine();
                } str = br.readLine() str br.readLine() br.readLine br return str; str int nextInt() {
                return Integer.parseInt(next());
            } nextInt {
                return Integer.parseInt(next());
            } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
                return Long.parseLong(next());
            } nextLong {
                return Long.parseLong(next());
            } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() {
                return Double.parseDouble(next());
            } nextDouble {
                return Double.parseDouble(next());
            } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String next() {
                while (st == null || !st.hasMoreElements()) {
                    try {
                        st = new StringTokenizer(br.readLine());
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            } next {
                while (st == null || !st.hasMoreElements()) {
                    try {
                        st = new StringTokenizer(br.readLine());
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            } while (st == null || !st.hasMoreElements()) {
                    try {
                        st = new StringTokenizer(br.readLine());
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
                    try {
                        st = new StringTokenizer(br.readLine());
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                } try {
                        st = new StringTokenizer(br.readLine());
                    } catch (IOException e) {
                        e.printStackTrace();
                    } catch (IOException e) {
                        e.printStackTrace();
                    } IOException e {
                        e.printStackTrace();
                    } e.printStackTrace() e.printStackTrace e {
                        st = new StringTokenizer(br.readLine());
                    } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public class pair {
            int a;
            int b;

            pair(int p, int q) {
                a = p;
                b = q;
            }
            public int hashCode() {
                return new Integer(a).hashCode() * 31 + new Integer(b).hashCode();
            }
        } pair int a; a int b; b pair(int p, int q) {
                a = p;
                b = q;
            } pair {
                a = p;
                b = q;
            } a = p a p b = q b q int p p int q q public int hashCode() {
                return new Integer(a).hashCode() * 31 + new Integer(b).hashCode();
            } hashCode {
                return new Integer(a).hashCode() * 31 + new Integer(b).hashCode();
            } return new Integer(a).hashCode() * 31 + new Integer(b).hashCode(); new Integer(a).hashCode() * 31 + new Integer(b).hashCode() new Integer(a).hashCode() * 31 new Integer(a).hashCode() new Integer(a).hashCode new Integer(a) 31 new Integer(b).hashCode() new Integer(b).hashCode new Integer(b) public class Main {
        public static class FastReader {
            BufferedReader br;
            StringTokenizer st;

            public FastReader() {
                br = new BufferedReader(new InputStreamReader(System.in));
            }

            String nextLine() {
                String str = "";
                try {
                    str = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return str;
            }

            int nextInt() {
                return Integer.parseInt(next());
            }

            long nextLong() {
                return Long.parseLong(next());
            }

            double nextDouble() {
                return Double.parseDouble(next());
            }

            String next() {
                while (st == null || !st.hasMoreElements()) {
                    try {
                        st = new StringTokenizer(br.readLine());
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            }


        }
        public class pair {
            int a;
            int b;

            pair(int p, int q) {
                a = p;
                b = q;
            }
            public int hashCode() {
                return new Integer(a).hashCode() * 31 + new Integer(b).hashCode();
            }
        }

        public static int gcd(int a, int b) {
            if (a == 1 || b == 1)
                return 1;
            if (a == 0)
                return b;
            if (b == 0)
                return a;
            return gcd(b % a, a);
        }






        public static void main(String[] args) {
            FastReader s=new FastReader();
            int a=s.nextInt();
           int[] arr=new int[a];
           for(int i=0;i<a;i++)
           {
               arr[i]=s.nextInt();
           }
           int flag=0;
           for(int i=0;i<a;i++)
           {
               if(arr[i]%2==0)
               {
                   if(arr[i]%3!=0 && arr[i]%5!=0)
                   {
                       flag=1;
                       break;
                   }
               }
           }
           if(flag==0)
               System.out.println("APPROVED");
           else
               System.out.println("DENIED");
        }
        




    } public class Main {
        public static class FastReader {
            BufferedReader br;
            StringTokenizer st;

            public FastReader() {
                br = new BufferedReader(new InputStreamReader(System.in));
            }

            String nextLine() {
                String str = "";
                try {
                    str = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return str;
            }

            int nextInt() {
                return Integer.parseInt(next());
            }

            long nextLong() {
                return Long.parseLong(next());
            }

            double nextDouble() {
                return Double.parseDouble(next());
            }

            String next() {
                while (st == null || !st.hasMoreElements()) {
                    try {
                        st = new StringTokenizer(br.readLine());
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            }


        }
        public class pair {
            int a;
            int b;

            pair(int p, int q) {
                a = p;
                b = q;
            }
            public int hashCode() {
                return new Integer(a).hashCode() * 31 + new Integer(b).hashCode();
            }
        }

        public static int gcd(int a, int b) {
            if (a == 1 || b == 1)
                return 1;
            if (a == 0)
                return b;
            if (b == 0)
                return a;
            return gcd(b % a, a);
        }






        public static void main(String[] args) {
            FastReader s=new FastReader();
            int a=s.nextInt();
           int[] arr=new int[a];
           for(int i=0;i<a;i++)
           {
               arr[i]=s.nextInt();
           }
           int flag=0;
           for(int i=0;i<a;i++)
           {
               if(arr[i]%2==0)
               {
                   if(arr[i]%3!=0 && arr[i]%5!=0)
                   {
                       flag=1;
                       break;
                   }
               }
           }
           if(flag==0)
               System.out.println("APPROVED");
           else
               System.out.println("DENIED");
        }
        




    } Main
    import javax.swing.*;
    import java.util.*;
    import java.io.*;


    public class Main {
        public static class FastReader {
            BufferedReader br;
            StringTokenizer st;

            public FastReader() {
                br = new BufferedReader(new InputStreamReader(System.in));
            }

            String nextLine() {
                String str = "";
                try {
                    str = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return str;
            }

            int nextInt() {
                return Integer.parseInt(next());
            }

            long nextLong() {
                return Long.parseLong(next());
            }

            double nextDouble() {
                return Double.parseDouble(next());
            }

            String next() {
                while (st == null || !st.hasMoreElements()) {
                    try {
                        st = new StringTokenizer(br.readLine());
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            }


        }
        public class pair {
            int a;
            int b;

            pair(int p, int q) {
                a = p;
                b = q;
            }
            public int hashCode() {
                return new Integer(a).hashCode() * 31 + new Integer(b).hashCode();
            }
        }

        public static int gcd(int a, int b) {
            if (a == 1 || b == 1)
                return 1;
            if (a == 0)
                return b;
            if (b == 0)
                return a;
            return gcd(b % a, a);
        }






        public static void main(String[] args) {
            FastReader s=new FastReader();
            int a=s.nextInt();
           int[] arr=new int[a];
           for(int i=0;i<a;i++)
           {
               arr[i]=s.nextInt();
           }
           int flag=0;
           for(int i=0;i<a;i++)
           {
               if(arr[i]%2==0)
               {
                   if(arr[i]%3!=0 && arr[i]%5!=0)
                   {
                       flag=1;
                       break;
                   }
               }
           }
           if(flag==0)
               System.out.println("APPROVED");
           else
               System.out.println("DENIED");
        }
        




    }







