import Data.List
f:: [Int]->Int
f [] = 0
f [x] =  if x `mod`2== 0 && x `mod` 3 == 0 then 0 else if x`mod`2== 0 && x `mod` 5 == 0 then 0 else if x `mod` 2 /=0 then 0  else 1

f (x:xs) = if x`mod`2== 0 && x `mod` 3==0 then 0 + f xs else if x`mod`2== 0 && x `mod` 5 == 0 then 0 + f xs else if x `mod` 2 /=0 then 0+ f xs else 1+f xs

main = do
  _ <- getLine
  s <- map read.words<$>getLine
  if f s == 0 then putStrLn "APPROVED" else putStrLn "DENIED"