x, y, z, h = map(int, input(). split()) if (x == z and y == h) or (x == y and z == h) or (x == h and y == z) or (x == y == z == h): print("YES") else: print("NO")