a,b,c,d,e=map(int, input().split())
if b==d:
  print('Yes')
else:
  print('No')