Imports System

Class B
	Shared Sub Main
		Dim n As Integer
		Dim inputs() As String
		Dim ans As Boolean = True

		inputs = Console.ReadLine().Split()
		n = Integer.Parse(inputs(0))

		inputs = Console.ReadLine().Split()
		For i As Integer = 0 To n-1
			Dim data As Integer
			data = Integer.Parse(inputs(i))
			If data Mod 2 = 0
				If data Mod 3 = 0 OrElse data Mod 5 = 0
					'OK
				Else
					ans = False
				End If
			End If
		Next
		
		If ans
			Console.WriteLine("APPROVED")
		Else
			Console.WriteLine("DENIED")
		End If

	End Sub
End Class
