@staticmethod
def b():
    (a, b, c, d) = map(int, sys.stdin.read().split())
    print(('YES' if ((a == c) or (b == c) or (a == d) or (b == d)) else 'NO'))
@staticmethod
def b():
    (a, b, c, d) = map(int, sys.stdin.read().split())
    print(('YES' if ((a == c) or (b == c) or (a == d) or (b == d)) else 'NO'))