In a randomized, sham-controlled trial the investigators will test whether supplemental oxygen given during cardiopulmonary exercise testing will improve exercise performance and physiological parameters in patients with pulmonary arterial or chronic thromboembolic pulmonary hypertension.