Viagra, commonly known as sildenafil, is a drug primarily used to treat erectile impairment , a ailment where males have trouble achieving or keeping an erection . Beyond this purpose, it is sometimes utilized off-label in the treatment of pulmonary hypertension and certain medical issues . Howev