How did the following Supreme Court Cases help establish the supremacy of federal over state laws?

McCulloch v. Maryland (1819)
Gibbons v. Ogden (1824)