Is it safe to take both Tylenol Acetaminophen and Aleve Naproxen at the same time?

I heard that Tylenol (Acetaminophen) is better for headaches and Aleve is better to reduce inflammation. Is it safe to take both Acetaminophen Tylenol and Naproxen Aleve at the same time? What about taking Aleve and Advil at the same time?