x1,y1,x2,y2,x3 = map(int,input().split())
print('Yes' if abs(y1) == abs(y2) else 'No' )