Problem:
Score: 100 points

Problem Statement

A triple of numbers is said to be poor when two of those numbers are equal but the other number is different from those two numbers.

You will be given three integers A, B, and C. If this triple is poor, print Yes; otherwise, print No.

Constraints

A, B, and C are all integers between 1 and 9 (inclusive).

Input

Input is given from Standard Input in the following format:

A B C

Output

If the given triple is poor, print Yes; otherwise, print No.

Sample Input 1

5 7 5

Sample Output 1

Yes

A and C are equal, but B is different from those two numbers, so this triple is poor.

Sample Input 2

4 4 4

Sample Output 2

No

A, B, and C are all equal, so this triple is not poor.

Sample Input 3

4 9 6

Sample Output 3

No

Sample Input 4

3 3 4

Sample Output 4

Yes

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

#include <iostream>
#include <vector>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

#define rep(i,n) for(int i = 0; i < (n); ++i)
#define MOOD 1000000007

using namespace std;
using ll = long long;
using P = pair<int,int>;

struct UnionFind{
    vector<int> d;
    UnionFind(int n = 0):d(n,-1){};

    int find(int x){
        if(d[x] < 0) {
            return x;
        }
        else{
            return d[x] = find(d[x]);
        }
    }
    bool unite(int x, int y) {
        x = find(x);
        y = find(y);
        if (x == y) return false;
        if (d[x] > d[y]) swap(x, y);

        d[x] += d[y];
        d[y] = x;
        return true;
    }
    bool same(int x, int y){
        return find(x) == find(y);
    }
    int size(int x){
        return -d[find(x)];
    }

};

struct mint {
    ll x;

    mint(ll x) : x((x % MOOD + MOOD) % MOOD) {}

    mint operator-() const { return mint(-x); }

    mint &operator+=(const mint a) {
        if ((x += a.x) >= MOOD) x -= MOOD;
        return *this;
    }
    mint& operator-=(const mint a) {
        if ((x += MOOD-a.x) >= MOOD) x -= MOOD;
        return *this;
    }

    mint &operator*=(const mint a) {
        if ((x *= a.x) %= MOOD);
        return *this;
    }

    mint operator+(const mint a)const {
        mint res(*this);
        return res += a;
    }

    mint operator-(const mint a) const {
        mint res(*this);
        return res -= a;
    }

    mint operator*(const mint a) const {
        mint res(*this);
        return res *= a;
    }

    mint pow(ll t) const{
        if(!t) return 1;
        mint a = pow(t>>1);
        a *= a;
        if(t&1) a *= *this;
        return a;
    }

    mint inv() const {
        return pow(MOOD-2);
    }

    mint& operator/=(const mint a) {
        return (*this) *= a.inv();
    }

    mint operator/(const mint a) const {
        mint res(*this);
        return res/=a;
    }

};

mint kaijyo(int n) {
    if (n == 0) return 1;
    mint x = kaijyo(n/2);
    x *= x;
    if (n%2 == 1) x *= 2;
    return x;
}

mint choose(int n, int a) {
    mint x = 1, y = 1;
    rep(i,a) {
        x *= n-i;
        y *= i+1;
    }
    return x / y;
}

int main() {
    int A,B,C;
    scanf("%d %d %d",&A,&B,&C);
    if(A==B && A !=C){
        printf("Yes");
    }
    else if(A==C && C != B){
        printf("Yes");
    }
    else if(B==C && C != A){
        printf("Yes");
    }
    else{
        printf("No");
    }

    return 0;
}