Masses of heavy baryons in the relativistic quark model