main = do
    n <- readLn :: IO Int
    as <- filter (\x -> even x) . map read . words <$> getLine :: IO [Int]
    putStrLn $ solve as

solve [] = "APPROVED"
solve (x:xs) | (even x) && x `mod` 3 == 0 = solve xs
             | (even x) && x `mod` 5 == 0 = solve xs
             | otherwise = "DENIED"
