import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String data1 = sc.nextLine();
        String data2 = sc.nextLine();
        
        String[] array = data2.split(" ");
        int n = Integer.parseInt(data1);
        
        String result = "APPROVED";
        for(int i = 0; i < n; i++)
        {
            int buf = Integer.parseInt(array[i]);
            if(buf % 2 == 0)
            {
                if(buf % 3 != 0 && buf % 5 != 0)
                {
                    result = "DENIED";
                    break;
                }
            }
        }
        
        System.out.println(result);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String data1 = sc.nextLine();
        String data2 = sc.nextLine();
        
        String[] array = data2.split(" ");
        int n = Integer.parseInt(data1);
        
        String result = "APPROVED";
        for(int i = 0; i < n; i++)
        {
            int buf = Integer.parseInt(array[i]);
            if(buf % 2 == 0)
            {
                if(buf % 3 != 0 && buf % 5 != 0)
                {
                    result = "DENIED";
                    break;
                }
            }
        }
        
        System.out.println(result);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String data1 = sc.nextLine();
        String data2 = sc.nextLine();
        
        String[] array = data2.split(" ");
        int n = Integer.parseInt(data1);
        
        String result = "APPROVED";
        for(int i = 0; i < n; i++)
        {
            int buf = Integer.parseInt(array[i]);
            if(buf % 2 == 0)
            {
                if(buf % 3 != 0 && buf % 5 != 0)
                {
                    result = "DENIED";
                    break;
                }
            }
        }
        
        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);
        String data1 = sc.nextLine();
        String data2 = sc.nextLine();
        
        String[] array = data2.split(" ");
        int n = Integer.parseInt(data1);
        
        String result = "APPROVED";
        for(int i = 0; i < n; i++)
        {
            int buf = Integer.parseInt(array[i]);
            if(buf % 2 == 0)
            {
                if(buf % 3 != 0 && buf % 5 != 0)
                {
                    result = "DENIED";
                    break;
                }
            }
        }
        
        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String data1 = sc.nextLine(); data1 sc.nextLine() sc.nextLine sc String data2 = sc.nextLine(); data2 sc.nextLine() sc.nextLine sc String[] array = data2.split(" "); array data2.split(" ") data2.split data2 " " int n = Integer.parseInt(data1); n Integer.parseInt(data1) Integer.parseInt Integer data1 String result = "APPROVED"; result "APPROVED" for(int i = 0; i < n; i++)
        {
            int buf = Integer.parseInt(array[i]);
            if(buf % 2 == 0)
            {
                if(buf % 3 != 0 && buf % 5 != 0)
                {
                    result = "DENIED";
                    break;
                }
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int buf = Integer.parseInt(array[i]);
            if(buf % 2 == 0)
            {
                if(buf % 3 != 0 && buf % 5 != 0)
                {
                    result = "DENIED";
                    break;
                }
            }
        } {
            int buf = Integer.parseInt(array[i]);
            if(buf % 2 == 0)
            {
                if(buf % 3 != 0 && buf % 5 != 0)
                {
                    result = "DENIED";
                    break;
                }
            }
        } int buf = Integer.parseInt(array[i]); buf Integer.parseInt(array[i]) Integer.parseInt Integer array[i] array i if(buf % 2 == 0)
            {
                if(buf % 3 != 0 && buf % 5 != 0)
                {
                    result = "DENIED";
                    break;
                }
            } buf % 2 == 0 buf % 2 buf 2 0 {
                if(buf % 3 != 0 && buf % 5 != 0)
                {
                    result = "DENIED";
                    break;
                }
            } if(buf % 3 != 0 && buf % 5 != 0)
                {
                    result = "DENIED";
                    break;
                } buf % 3 != 0 && buf % 5 != 0 buf % 3 != 0 buf % 3 buf 3 0 buf % 5 != 0 buf % 5 buf 5 0 {
                    result = "DENIED";
                    break;
                } result = "DENIED" result "DENIED" break; System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String data1 = sc.nextLine();
        String data2 = sc.nextLine();
        
        String[] array = data2.split(" ");
        int n = Integer.parseInt(data1);
        
        String result = "APPROVED";
        for(int i = 0; i < n; i++)
        {
            int buf = Integer.parseInt(array[i]);
            if(buf % 2 == 0)
            {
                if(buf % 3 != 0 && buf % 5 != 0)
                {
                    result = "DENIED";
                    break;
                }
            }
        }
        
        System.out.println(result);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String data1 = sc.nextLine();
        String data2 = sc.nextLine();
        
        String[] array = data2.split(" ");
        int n = Integer.parseInt(data1);
        
        String result = "APPROVED";
        for(int i = 0; i < n; i++)
        {
            int buf = Integer.parseInt(array[i]);
            if(buf % 2 == 0)
            {
                if(buf % 3 != 0 && buf % 5 != 0)
                {
                    result = "DENIED";
                    break;
                }
            }
        }
        
        System.out.println(result);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String data1 = sc.nextLine();
        String data2 = sc.nextLine();
        
        String[] array = data2.split(" ");
        int n = Integer.parseInt(data1);
        
        String result = "APPROVED";
        for(int i = 0; i < n; i++)
        {
            int buf = Integer.parseInt(array[i]);
            if(buf % 2 == 0)
            {
                if(buf % 3 != 0 && buf % 5 != 0)
                {
                    result = "DENIED";
                    break;
                }
            }
        }
        
        System.out.println(result);
    }
}
