local N = io.read("n")
local A = {}
for i=1,N do
  A[i] = io.read("n")
end
for i=1,N do
  if A[i] % 2 == 0 then
    if A[i] % 3 == 0 or A[i] % 5 == 0 then
      
    else
      print("DENIED")
      return
    end
  end
end
print("APPROVED")