main::IO()
main = do
    _ <- getLine
    n <- map read . words <$> getLine
    let evenlist = filter even n
    putStrLn $ if check evenlist then "APPROVED" else "DENIED"

check :: [Int] -> Bool
check (x:xs) = if (mod x 3 ==0) || (mod x 5 ==0)
	then check xs
    else False
check [] = True