main = do
    n <- readLn :: IO Int
    a <- map read . words <$> getLine :: IO [Int]
    let isOK = all (\x -> mod x 3 == 0 || mod x 5 == 0) (filter even a)
    putStrLn $ if isOK then "APPROVED" else "DENIED"
