import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    _ <- getInt
    as <- getIntList
    putStrLn . solve $ filter even as


solve es | and $ map (\e -> e `mod` 3 == 0 || e `mod` 5 == 0) es = "APPROVED"
         | otherwise = "DENIED"