Luminous and Variable Stars in M31 and M33 V. The Upper HR Diagram