import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    X = map(int, readline().split())

    if len(set(X)) == 2:
        print('Yes')
    else:
        print('No')

    return


if __name__ == '__main__':
    main() import sys sys read = sys.stdin.read read sys.stdin.read sys.stdin sys stdin read readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline readlines = sys.stdin.readlines readlines sys.stdin.readlines sys.stdin sys stdin readlines sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = 1 << 60 INF 1 << 60 1 60 MOD = 1000000007 MOD 1000000007 def main():
    X = map(int, readline().split())

    if len(set(X)) == 2:
        print('Yes')
    else:
        print('No')

    return main X = map(int, readline().split()) X map(int, readline().split()) map int readline().split() ().split () readline split if len(set(X)) == 2:
        print('Yes')
    else:
        print('No')

     len(set(X)) == 2 len(set(X)) len set(X) set X 2 print('Yes') print 'Yes' print('No') print 'No' return if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main read = sys.stdin.read sys.stdin.read read INF = 1 << 60 1 << 60 INF readlines = sys.stdin.readlines sys.stdin.readlines readlines readline = sys.stdin.readline sys.stdin.readline readline def main():
    X = map(int, readline().split())

    if len(set(X)) == 2:
        print('Yes')
    else:
        print('No')

    return def main():
    X = map(int, readline().split())

    if len(set(X)) == 2:
        print('Yes')
    else:
        print('No')

    return main MOD = 1000000007 1000000007 MOD
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    X = map(int, readline().split())

    if len(set(X)) == 2:
        print('Yes')
    else:
        print('No')

    return


if __name__ == '__main__':
    main()
