import copy la = map(int,input().split()) lb = map(int,input().split()) c = False for i in range(3): LA = copy.copy(la) LB = copy.copy(lb) LA[i] = lb[i] LB[i] = la[i] if (LA[0] != LA[1] != LA[2] != LA[0]) and ((LA[0] < LA[1] > LA[2]) or (LA[0] > LA[1] < LA[2])): if (LB[0] != LB[1] != LB[2] != LB[0]) and ((LB[0] < LB[1] > LB[2]) or (LB[0] > LB[1] < LB[2])): c = True if c: print("Yes") else: print("No")