X1,Y1,X2,Y2,X3 = map(int, input().split(' ')) print(['No', 'Yes'][Y1==Y2])