S = [int(x) for x in list(input())] print("Yes" if S[0] + S[2] == S[1] + S[3] else "No")