import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int[] a = new int[n];

		boolean handan = true;
		for(int i= 0;i<n;i++) {

			a[i] = scan.nextInt();


		if(a[i]%2 == 0) {
			if(a[i]%3 != 0 && a[i]%5 != 0) {

				handan = false;
			}
		}
		}

		System.out.println(handan?"APPROVED":"DENIED");

		scan.close();

	}

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

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int[] a = new int[n];

		boolean handan = true;
		for(int i= 0;i<n;i++) {

			a[i] = scan.nextInt();


		if(a[i]%2 == 0) {
			if(a[i]%3 != 0 && a[i]%5 != 0) {

				handan = false;
			}
		}
		}

		System.out.println(handan?"APPROVED":"DENIED");

		scan.close();

	}

} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int[] a = new int[n];

		boolean handan = true;
		for(int i= 0;i<n;i++) {

			a[i] = scan.nextInt();


		if(a[i]%2 == 0) {
			if(a[i]%3 != 0 && a[i]%5 != 0) {

				handan = false;
			}
		}
		}

		System.out.println(handan?"APPROVED":"DENIED");

		scan.close();

	} main {

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int[] a = new int[n];

		boolean handan = true;
		for(int i= 0;i<n;i++) {

			a[i] = scan.nextInt();


		if(a[i]%2 == 0) {
			if(a[i]%3 != 0 && a[i]%5 != 0) {

				handan = false;
			}
		}
		}

		System.out.println(handan?"APPROVED":"DENIED");

		scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[] a = new int[n]; a new int[n] n boolean handan = true; handan true for(int i= 0;i<n;i++) {

			a[i] = scan.nextInt();


		if(a[i]%2 == 0) {
			if(a[i]%3 != 0 && a[i]%5 != 0) {

				handan = false;
			}
		}
		} int i= 0; int i= 0; i 0 i<n i n i++ i++ i {

			a[i] = scan.nextInt();


		if(a[i]%2 == 0) {
			if(a[i]%3 != 0 && a[i]%5 != 0) {

				handan = false;
			}
		}
		} {

			a[i] = scan.nextInt();


		if(a[i]%2 == 0) {
			if(a[i]%3 != 0 && a[i]%5 != 0) {

				handan = false;
			}
		}
		} a[i] = scan.nextInt() a[i] a i scan.nextInt() scan.nextInt scan if(a[i]%2 == 0) {
			if(a[i]%3 != 0 && a[i]%5 != 0) {

				handan = false;
			}
		} a[i]%2 == 0 a[i]%2 a[i] a i 2 0 {
			if(a[i]%3 != 0 && a[i]%5 != 0) {

				handan = false;
			}
		} if(a[i]%3 != 0 && a[i]%5 != 0) {

				handan = false;
			} 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 {

				handan = false;
			} handan = false handan false System.out.println(handan?"APPROVED":"DENIED") System.out.println System.out System System.out handan?"APPROVED":"DENIED" handan "APPROVED" "DENIED" scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int[] a = new int[n];

		boolean handan = true;
		for(int i= 0;i<n;i++) {

			a[i] = scan.nextInt();


		if(a[i]%2 == 0) {
			if(a[i]%3 != 0 && a[i]%5 != 0) {

				handan = false;
			}
		}
		}

		System.out.println(handan?"APPROVED":"DENIED");

		scan.close();

	}

} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int[] a = new int[n];

		boolean handan = true;
		for(int i= 0;i<n;i++) {

			a[i] = scan.nextInt();


		if(a[i]%2 == 0) {
			if(a[i]%3 != 0 && a[i]%5 != 0) {

				handan = false;
			}
		}
		}

		System.out.println(handan?"APPROVED":"DENIED");

		scan.close();

	}

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

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int[] a = new int[n];

		boolean handan = true;
		for(int i= 0;i<n;i++) {

			a[i] = scan.nextInt();


		if(a[i]%2 == 0) {
			if(a[i]%3 != 0 && a[i]%5 != 0) {

				handan = false;
			}
		}
		}

		System.out.println(handan?"APPROVED":"DENIED");

		scan.close();

	}

}
