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