A characterization of the leximin solution of the bargaining problem