main::IO()
main = do
    _ <- getLine
    n <- map read . words <$> getLine
    let list = [x | x <- (filter even n), (mod x 3 ==0) || (mod x 5 ==0) ]
    putStrLn $ if (length list)==(length $filter even n) then "APPROVED" else "DENIED"