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 Kotlin (1.0.0) (judge verdict: Accepted)


import java.io.PrintWriter
import java.util.*

    @JvmField
    val INPUT = System.`in`
    @JvmField
    val OUTPUT = System.out

    @JvmField
    val _reader = INPUT.bufferedReader()

    fun readLine(): String? = _reader.readLine()
    fun readLn() = _reader.readLine()!!
    @JvmField
    var _tokenizer: StringTokenizer = StringTokenizer("")

    fun read(): String {
        while (_tokenizer.hasMoreTokens().not()) _tokenizer = StringTokenizer(_reader.readLine() ?: return "", " ")
        return _tokenizer.nextToken()
    }

    fun readInt() = read().toInt()
    fun readDouble() = read().toDouble()
    fun readLong() = read().toLong()
    fun readIntArray(n: Int) = IntArray(n) { read().toInt() }
    fun readDoubleArray(n: Int) = DoubleArray(n) { read().toDouble() }
    fun readLongArray(n: Int) = LongArray(n) { read().toLong() }

    @JvmField
    val rw = PrintWriter(OUTPUT, false)

    inline fun output(block: PrintWriter.() -> Unit) {
        rw.apply(block).flush()
    }

    fun printLArray(a: LongArray) { a.forEach { x -> rw.print(x); rw.print(" ") };rw.println() }
    fun printIArray(a: IntArray) { a.forEach { x -> rw.print(x);rw.print(" ") };rw.println() }

    private var is_prime: BooleanArray? = null
    private var prime: ArrayList<Int>? = null
    fun sieve(n: Int) {
        is_prime = BooleanArray(n + 10)
        prime = ArrayList()
        for (i in 2..n) is_prime!![i] = true
        for (i in 2..n) {
            if (is_prime!![i]) prime!!.add(i)
            var j = 0
            while (j < prime!!.size && i * prime!![j] < n) {
                is_prime!![i * prime!![j]] = false
                if (i % prime!![j] == 0) break
                ++j
            }
        }
    }

    fun mergeSort(a: IntArray) {
        val n = a.size
        if (n < 2) {
            return
        }
        val mid = n / 2;
        val left = IntArray(mid);
        val right = IntArray(n - mid)
        for (i in 0 until mid) {
            left[i] = a[i]
        }
        for (i in mid until n) {
            right[i - mid] = a[i]
        }
        mergeSort(left)
        mergeSort(right)
        merge(left, right, a)
    }

    fun merge(left: IntArray, right: IntArray, a: IntArray) {
        val nLeft = left.size;
        val nRight = right.size
        var i = 0;
        var j = 0;
        var k = 0
        while (i < nLeft && j < nRight) {
            if (left[i] <= right[j]) {
                a[k] = left[i];k++;i++
            } else {
                a[k] = right[j]; k++;j++
            }
        }
        while (i < nLeft) {
            a[k] = left[i]; i++; k++
        }
        while (j < nRight) {
            a[k] = right[j]; j++; k++
        }
    }

    fun gcd(a: Long, b: Long): Long {
        if (b == 0L) return a
        return gcd(b, a % b)
    }

    fun smallest(a: IntArray): Int {
        var min = a[0]
        for (i in 1 until a.size) {
            if (a[i] < min) {
                min = a[i]
            }
        }
        return min
    }
fun main(args: Array<String>){
    var (a,b,c) = readLine()!!.split(' ').map { it.toInt() }
    rw.println(if (a==b&&b!=c || b==c&&c!=a || c==a&&a!=b)"Yes" else "No")

    rw.close()
}