import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int x = 0;
        boolean approved = true;
        
        for(int i = 0; i < n; i++) {
            x = Integer.parseInt(sc.next());
            if((x%2==0)&&(x%3 != 0)&&(x%5 != 0)) approved = false;
        }
        if(approved){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int x = 0;
        boolean approved = true;
        
        for(int i = 0; i < n; i++) {
            x = Integer.parseInt(sc.next());
            if((x%2==0)&&(x%3 != 0)&&(x%5 != 0)) approved = false;
        }
        if(approved){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int x = 0;
        boolean approved = true;
        
        for(int i = 0; i < n; i++) {
            x = Integer.parseInt(sc.next());
            if((x%2==0)&&(x%3 != 0)&&(x%5 != 0)) approved = false;
        }
        if(approved){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int x = 0;
        boolean approved = true;
        
        for(int i = 0; i < n; i++) {
            x = Integer.parseInt(sc.next());
            if((x%2==0)&&(x%3 != 0)&&(x%5 != 0)) approved = false;
        }
        if(approved){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = 0; x 0 boolean approved = true; approved true for(int i = 0; i < n; i++) {
            x = Integer.parseInt(sc.next());
            if((x%2==0)&&(x%3 != 0)&&(x%5 != 0)) approved = false;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            x = Integer.parseInt(sc.next());
            if((x%2==0)&&(x%3 != 0)&&(x%5 != 0)) approved = false;
        } {
            x = Integer.parseInt(sc.next());
            if((x%2==0)&&(x%3 != 0)&&(x%5 != 0)) approved = false;
        } x = Integer.parseInt(sc.next()) x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if((x%2==0)&&(x%3 != 0)&&(x%5 != 0)) approved = false; (x%2==0)&&(x%3 != 0)&&(x%5 != 0) (x%2==0)&&(x%3 != 0)&&(x%5 != 0) (x%2==0) x%2 x 2 0 (x%3 != 0) x%3 x 3 0 (x%5 != 0) x%5 x 5 0 approved = false approved false if(approved){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        } approved {
            System.out.println("APPROVED");
        } System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" {
            System.out.println("DENIED");
        } System.out.println("DENIED") System.out.println System.out System System.out "DENIED" String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int x = 0;
        boolean approved = true;
        
        for(int i = 0; i < n; i++) {
            x = Integer.parseInt(sc.next());
            if((x%2==0)&&(x%3 != 0)&&(x%5 != 0)) approved = false;
        }
        if(approved){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int x = 0;
        boolean approved = true;
        
        for(int i = 0; i < n; i++) {
            x = Integer.parseInt(sc.next());
            if((x%2==0)&&(x%3 != 0)&&(x%5 != 0)) approved = false;
        }
        if(approved){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int n = Integer.parseInt(sc.next());
        int x = 0;
        boolean approved = true;
        
        for(int i = 0; i < n; i++) {
            x = Integer.parseInt(sc.next());
            if((x%2==0)&&(x%3 != 0)&&(x%5 != 0)) approved = false;
        }
        if(approved){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    }
}