import java.util.*;
public class Main {
	public static void main(String[] args){
		String result = "APPROVED";
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			if (a % 2 == 0) {
				if (a % 3 == 0 || a % 5 == 0) {
					continue;
                }
				result = "DENIED";
				break;
            }
        }
		System.out.println(result);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		String result = "APPROVED";
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			if (a % 2 == 0) {
				if (a % 3 == 0 || a % 5 == 0) {
					continue;
                }
				result = "DENIED";
				break;
            }
        }
		System.out.println(result);
	}
} Main public static void main(String[] args){
		String result = "APPROVED";
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			if (a % 2 == 0) {
				if (a % 3 == 0 || a % 5 == 0) {
					continue;
                }
				result = "DENIED";
				break;
            }
        }
		System.out.println(result);
	} main {
		String result = "APPROVED";
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			if (a % 2 == 0) {
				if (a % 3 == 0 || a % 5 == 0) {
					continue;
                }
				result = "DENIED";
				break;
            }
        }
		System.out.println(result);
	} String result = "APPROVED"; result "APPROVED" Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			if (a % 2 == 0) {
				if (a % 3 == 0 || a % 5 == 0) {
					continue;
                }
				result = "DENIED";
				break;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int a = sc.nextInt();
			if (a % 2 == 0) {
				if (a % 3 == 0 || a % 5 == 0) {
					continue;
                }
				result = "DENIED";
				break;
            }
        } {
			int a = sc.nextInt();
			if (a % 2 == 0) {
				if (a % 3 == 0 || a % 5 == 0) {
					continue;
                }
				result = "DENIED";
				break;
            }
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc if (a % 2 == 0) {
				if (a % 3 == 0 || a % 5 == 0) {
					continue;
                }
				result = "DENIED";
				break;
            } a % 2 == 0 a % 2 a 2 0 {
				if (a % 3 == 0 || a % 5 == 0) {
					continue;
                }
				result = "DENIED";
				break;
            } if (a % 3 == 0 || a % 5 == 0) {
					continue;
                } a % 3 == 0 || a % 5 == 0 a % 3 == 0 a % 3 a 3 0 a % 5 == 0 a % 5 a 5 0 {
					continue;
                } continue; 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){
		String result = "APPROVED";
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			if (a % 2 == 0) {
				if (a % 3 == 0 || a % 5 == 0) {
					continue;
                }
				result = "DENIED";
				break;
            }
        }
		System.out.println(result);
	}
} public class Main {
	public static void main(String[] args){
		String result = "APPROVED";
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			if (a % 2 == 0) {
				if (a % 3 == 0 || a % 5 == 0) {
					continue;
                }
				result = "DENIED";
				break;
            }
        }
		System.out.println(result);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		String result = "APPROVED";
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();
			if (a % 2 == 0) {
				if (a % 3 == 0 || a % 5 == 0) {
					continue;
                }
				result = "DENIED";
				break;
            }
        }
		System.out.println(result);
	}
}