import Control.Applicative
import Data.Bool (bool)

main :: IO ()
main = getLine >> solve <$> f >>= putStrLn
  where
    f = map read <$> words <$> getLine

solve :: [Int] -> String
solve = bool "DENIED" "APPROVED" . all f
  where
    f x = odd x || x `mod` 3 == 0 || x `mod` 5 == 0
