a, b, c, d, e, f = map(int, input().split()) if a == b == c and d == e == f: print("NO") else: print("YES")