import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int len = sc.nextInt();
		int count = 0;
		while (count < len) {
			int j = sc.nextInt();
			if (j % 2 == 0) {
				if (j % 3 != 0 && j % 5 != 0) {
					break;
				}
			}
			count ++;

		}
		if (count == len) {
			System.out.println("APPROVED");
		} else {
			System.out.println("DENIED");
		}

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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int len = sc.nextInt();
		int count = 0;
		while (count < len) {
			int j = sc.nextInt();
			if (j % 2 == 0) {
				if (j % 3 != 0 && j % 5 != 0) {
					break;
				}
			}
			count ++;

		}
		if (count == len) {
			System.out.println("APPROVED");
		} else {
			System.out.println("DENIED");
		}

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

		Scanner sc = new Scanner(System.in);
		int len = sc.nextInt();
		int count = 0;
		while (count < len) {
			int j = sc.nextInt();
			if (j % 2 == 0) {
				if (j % 3 != 0 && j % 5 != 0) {
					break;
				}
			}
			count ++;

		}
		if (count == len) {
			System.out.println("APPROVED");
		} else {
			System.out.println("DENIED");
		}

	} main {

		Scanner sc = new Scanner(System.in);
		int len = sc.nextInt();
		int count = 0;
		while (count < len) {
			int j = sc.nextInt();
			if (j % 2 == 0) {
				if (j % 3 != 0 && j % 5 != 0) {
					break;
				}
			}
			count ++;

		}
		if (count == len) {
			System.out.println("APPROVED");
		} else {
			System.out.println("DENIED");
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int len = sc.nextInt(); len sc.nextInt() sc.nextInt sc int count = 0; count 0 while (count < len) {
			int j = sc.nextInt();
			if (j % 2 == 0) {
				if (j % 3 != 0 && j % 5 != 0) {
					break;
				}
			}
			count ++;

		} count < len count len {
			int j = sc.nextInt();
			if (j % 2 == 0) {
				if (j % 3 != 0 && j % 5 != 0) {
					break;
				}
			}
			count ++;

		} int j = sc.nextInt(); j sc.nextInt() sc.nextInt sc if (j % 2 == 0) {
				if (j % 3 != 0 && j % 5 != 0) {
					break;
				}
			} j % 2 == 0 j % 2 j 2 0 {
				if (j % 3 != 0 && j % 5 != 0) {
					break;
				}
			} if (j % 3 != 0 && j % 5 != 0) {
					break;
				} j % 3 != 0 && j % 5 != 0 j % 3 != 0 j % 3 j 3 0 j % 5 != 0 j % 5 j 5 0 {
					break;
				} break; count ++ count if (count == len) {
			System.out.println("APPROVED");
		} else {
			System.out.println("DENIED");
		} count == len count len {
			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) {

		Scanner sc = new Scanner(System.in);
		int len = sc.nextInt();
		int count = 0;
		while (count < len) {
			int j = sc.nextInt();
			if (j % 2 == 0) {
				if (j % 3 != 0 && j % 5 != 0) {
					break;
				}
			}
			count ++;

		}
		if (count == len) {
			System.out.println("APPROVED");
		} else {
			System.out.println("DENIED");
		}

	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int len = sc.nextInt();
		int count = 0;
		while (count < len) {
			int j = sc.nextInt();
			if (j % 2 == 0) {
				if (j % 3 != 0 && j % 5 != 0) {
					break;
				}
			}
			count ++;

		}
		if (count == len) {
			System.out.println("APPROVED");
		} else {
			System.out.println("DENIED");
		}

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int len = sc.nextInt();
		int count = 0;
		while (count < len) {
			int j = sc.nextInt();
			if (j % 2 == 0) {
				if (j % 3 != 0 && j % 5 != 0) {
					break;
				}
			}
			count ++;

		}
		if (count == len) {
			System.out.println("APPROVED");
		} else {
			System.out.println("DENIED");
		}

	}
}
