import java.util.Scanner;

public class Main
{

	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        int n = Integer.parseInt(str);

        str = scan.nextLine();
        String[] substr = str.split(" ", 0);

        String ans = "APPROVED";
		for (int i=0; i<n; i++) {
			int target = Integer.parseInt(substr[i]);
			if (target % 2 == 0) {
				if (target % 3 != 0 && target % 5 != 0 )  {
					ans = "DENIED";
				}
			}
		}
		System.out.println(ans);

	}

} import java.util.Scanner; Scanner java.util public class Main
{

	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        int n = Integer.parseInt(str);

        str = scan.nextLine();
        String[] substr = str.split(" ", 0);

        String ans = "APPROVED";
		for (int i=0; i<n; i++) {
			int target = Integer.parseInt(substr[i]);
			if (target % 2 == 0) {
				if (target % 3 != 0 && target % 5 != 0 )  {
					ans = "DENIED";
				}
			}
		}
		System.out.println(ans);

	}

} Main public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        int n = Integer.parseInt(str);

        str = scan.nextLine();
        String[] substr = str.split(" ", 0);

        String ans = "APPROVED";
		for (int i=0; i<n; i++) {
			int target = Integer.parseInt(substr[i]);
			if (target % 2 == 0) {
				if (target % 3 != 0 && target % 5 != 0 )  {
					ans = "DENIED";
				}
			}
		}
		System.out.println(ans);

	} main {
		Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        int n = Integer.parseInt(str);

        str = scan.nextLine();
        String[] substr = str.split(" ", 0);

        String ans = "APPROVED";
		for (int i=0; i<n; i++) {
			int target = Integer.parseInt(substr[i]);
			if (target % 2 == 0) {
				if (target % 3 != 0 && target % 5 != 0 )  {
					ans = "DENIED";
				}
			}
		}
		System.out.println(ans);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan int n = Integer.parseInt(str); n Integer.parseInt(str) Integer.parseInt Integer str str = scan.nextLine() str scan.nextLine() scan.nextLine scan String[] substr = str.split(" ", 0); substr str.split(" ", 0) str.split str " " 0 String ans = "APPROVED"; ans "APPROVED" for (int i=0; i<n; i++) {
			int target = Integer.parseInt(substr[i]);
			if (target % 2 == 0) {
				if (target % 3 != 0 && target % 5 != 0 )  {
					ans = "DENIED";
				}
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int target = Integer.parseInt(substr[i]);
			if (target % 2 == 0) {
				if (target % 3 != 0 && target % 5 != 0 )  {
					ans = "DENIED";
				}
			}
		} {
			int target = Integer.parseInt(substr[i]);
			if (target % 2 == 0) {
				if (target % 3 != 0 && target % 5 != 0 )  {
					ans = "DENIED";
				}
			}
		} int target = Integer.parseInt(substr[i]); target Integer.parseInt(substr[i]) Integer.parseInt Integer substr[i] substr i if (target % 2 == 0) {
				if (target % 3 != 0 && target % 5 != 0 )  {
					ans = "DENIED";
				}
			} target % 2 == 0 target % 2 target 2 0 {
				if (target % 3 != 0 && target % 5 != 0 )  {
					ans = "DENIED";
				}
			} if (target % 3 != 0 && target % 5 != 0 )  {
					ans = "DENIED";
				} target % 3 != 0 && target % 5 != 0 target % 3 != 0 target % 3 target 3 0 target % 5 != 0 target % 5 target 5 0 {
					ans = "DENIED";
				} ans = "DENIED" ans "DENIED" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main
{

	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        int n = Integer.parseInt(str);

        str = scan.nextLine();
        String[] substr = str.split(" ", 0);

        String ans = "APPROVED";
		for (int i=0; i<n; i++) {
			int target = Integer.parseInt(substr[i]);
			if (target % 2 == 0) {
				if (target % 3 != 0 && target % 5 != 0 )  {
					ans = "DENIED";
				}
			}
		}
		System.out.println(ans);

	}

} public class Main
{

	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        int n = Integer.parseInt(str);

        str = scan.nextLine();
        String[] substr = str.split(" ", 0);

        String ans = "APPROVED";
		for (int i=0; i<n; i++) {
			int target = Integer.parseInt(substr[i]);
			if (target % 2 == 0) {
				if (target % 3 != 0 && target % 5 != 0 )  {
					ans = "DENIED";
				}
			}
		}
		System.out.println(ans);

	}

} Main
import java.util.Scanner;

public class Main
{

	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        int n = Integer.parseInt(str);

        str = scan.nextLine();
        String[] substr = str.split(" ", 0);

        String ans = "APPROVED";
		for (int i=0; i<n; i++) {
			int target = Integer.parseInt(substr[i]);
			if (target % 2 == 0) {
				if (target % 3 != 0 && target % 5 != 0 )  {
					ans = "DENIED";
				}
			}
		}
		System.out.println(ans);

	}

}
