main :: IO()
main = do
    _ <- getLine
    ls <- map read . words <$> getLine
    putStrLn $ if all (\x -> x `mod` 2 == 1 || x `mod` 3 == 0 || x `mod` 5 == 0) ls
        then "APPROVED" else "DENIED"