main :: IO ()
main = do
  getLine
  as <- map read . words <$> getLine
  putStrLn $ if solve as then "APPROVED" else "DENIED"

solve :: [Int] -> Bool
solve as = all p as
  where
    p x = or [ odd x, x `mod` 3 == 0, x `mod` 5 == 0] 
