_, a, _, b, _ = map(int, input().split()) if a == b: print("Yes") else: print("No")