_, a, _, b, _ = [int(x) for x in input().split()] print("Yes" if a == b else "No")