import java.util.*;

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

public class Main
{
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
		int a,b,c=0,d=0;
		a=sc.nextInt();
		for(int i=0;i<a;i++)
		{
			b=sc.nextInt();
			if(b%2==0)
			{
				if(b%3==0 || b%5==0)
				{
					
				}
				else
				{
					
					c=1;
				}
			}
			else
			{
				int e=b;
			}
		}
		if(c==0)
		{
			System.out.println("APPROVED");
		}
		else
		{
			System.out.println("DENIED");
		}
	}
}