local n = io.read("*n")
local t = {}
for i = 1, n do
  t[i] = io.read("*n")
end
local f = true
for i = 1, n do
  if t[i] % 2 == 0 then
    if t[i] % 3 ~= 0 and t[i] % 5 ~= 0 then
      f = false
      break
    end
  end
end
print(f and "APPROVED" or "DENIED")
