import java.util.*;
import java.io.PrintWriter;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		int[] a = new int[n];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		boolean f=true;
		for (i = 0; i < n; i++) {
			if(a[i]%2==1)continue;
			if(a[i]%3!=0&&a[i]%5!=0) {
				f=false;
				break;
			}
		}
		out.println(f?"APPROVED":"DENIED");
	}
} import java.util.*; util.* java import java.io.PrintWriter; PrintWriter java.io import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Long.*; import static java.lang.Long.*; import static java.lang.Long.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		int[] a = new int[n];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		boolean f=true;
		for (i = 0; i < n; i++) {
			if(a[i]%2==1)continue;
			if(a[i]%3!=0&&a[i]%5!=0) {
				f=false;
				break;
			}
		}
		out.println(f?"APPROVED":"DENIED");
	}
} Main public static final int MOD = 1000000007; MOD 1000000007 public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		int[] a = new int[n];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		boolean f=true;
		for (i = 0; i < n; i++) {
			if(a[i]%2==1)continue;
			if(a[i]%3!=0&&a[i]%5!=0) {
				f=false;
				break;
			}
		}
		out.println(f?"APPROVED":"DENIED");
	} main {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		int[] a = new int[n];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		boolean f=true;
		for (i = 0; i < n; i++) {
			if(a[i]%2==1)continue;
			if(a[i]%3!=0&&a[i]%5!=0) {
				f=false;
				break;
			}
		}
		out.println(f?"APPROVED":"DENIED");
	} int i i j; j Scanner sc = new Scanner(in); sc new Scanner(in) int n = parseInt(sc.next()); n parseInt(sc.next()) parseInt sc.next() sc.next sc int[] a = new int[n]; a new int[n] n for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		} i = 0; i = 0 i 0 i < a.length i a.length a a.length i++ i++ i {
			a[i] = parseInt(sc.next());
		} {
			a[i] = parseInt(sc.next());
		} a[i] = parseInt(sc.next()) a[i] a i parseInt(sc.next()) parseInt sc.next() sc.next sc sc.close() sc.close sc boolean f=true; f true for (i = 0; i < n; i++) {
			if(a[i]%2==1)continue;
			if(a[i]%3!=0&&a[i]%5!=0) {
				f=false;
				break;
			}
		} i = 0; i = 0 i 0 i < n i n i++ i++ i {
			if(a[i]%2==1)continue;
			if(a[i]%3!=0&&a[i]%5!=0) {
				f=false;
				break;
			}
		} {
			if(a[i]%2==1)continue;
			if(a[i]%3!=0&&a[i]%5!=0) {
				f=false;
				break;
			}
		} if(a[i]%2==1)continue; a[i]%2==1 a[i]%2 a[i] a i 2 1 continue; if(a[i]%3!=0&&a[i]%5!=0) {
				f=false;
				break;
			} 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 {
				f=false;
				break;
			} f=false f false break; out.println(f?"APPROVED":"DENIED") out.println out f?"APPROVED":"DENIED" f "APPROVED" "DENIED" String[] args args public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		int[] a = new int[n];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		boolean f=true;
		for (i = 0; i < n; i++) {
			if(a[i]%2==1)continue;
			if(a[i]%3!=0&&a[i]%5!=0) {
				f=false;
				break;
			}
		}
		out.println(f?"APPROVED":"DENIED");
	}
} public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		int[] a = new int[n];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		boolean f=true;
		for (i = 0; i < n; i++) {
			if(a[i]%2==1)continue;
			if(a[i]%3!=0&&a[i]%5!=0) {
				f=false;
				break;
			}
		}
		out.println(f?"APPROVED":"DENIED");
	}
} Main
import java.util.*;
import java.io.PrintWriter;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static final int MOD = 1000000007;
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		int[] a = new int[n];
		for (i = 0; i < a.length; i++) {
			a[i] = parseInt(sc.next());
		}
		sc.close();
		boolean f=true;
		for (i = 0; i < n; i++) {
			if(a[i]%2==1)continue;
			if(a[i]%3!=0&&a[i]%5!=0) {
				f=false;
				break;
			}
		}
		out.println(f?"APPROVED":"DENIED");
	}
}
