Unified treatment of the problem of existence of maximal elements in binary relations: a characterization