stdin.ReadLine() |> ignore
stdin.ReadLine().Split()
|> Array.map int
|> Array.filter (fun x -> x%2=0 && x%6<>0 && x%10<>0)
|> Array.length
|> fun x -> if x=0 then "APPROVED" else "DENIED"
|> stdout.WriteLine