def greaterD( ef, gh):
    """
    Return True if pair ef has greater margin than pair gh.
    A pair is a pair of the form:    (pref[e,f],pref[f,e])
    Schulze says (page 154):
    "(N[e,f],N[f,e]) >_win (N[g,h],N[h,g]) 
    if and only if at least one of the following conditions is satisfied:
    1. N[e,f] > N[f,e] and N[g,h] <= N[h,g].
    2. N[e,f] >= N[f,e] and N[g,h] < N[h,g]. 
    3. N[e,f] > N[f,e] and N[g,h] > N[h,g] and N[e,f] > N[g,h]. 
    4. N[e,f] > N[f,e] and N[g,h] > N[h,g] and N[e,f] = N[g,h] and N[f,e] < N[h,g]."
    """
    nef,nfe = ef
    ngh,nhg = gh
    if nef >  nfe and ngh <= nhg: return True
    if nef >= nfe and ngh <  nhg: return True
    if nef >  nfe and ngh >  nhg and nef > ngh: return True
    if nef >  nfe and ngh >  nhg and nef==ngh and nfe < nhg: return True
    return False