A parametrization of the baryon octet and decuplet masses