def is_kadomatsu(a,b,c): if a==b or b==c or a==c or a+b+c-max(a,b,c)-min(a,b,c)==b: return False return True *a, = map(int,input().split()) *b, = map(int,input().split()) ok = 0 for i in range(3): for j in range(3): a[i],b[j] = b[j],a[i] ok |= is_kadomatsu(*a) and is_kadomatsu(*b) a[i],b[j] = b[j],a[i] print("Yes" if ok else "No")