import java.util.*;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		char[] c = {sc.next().charAt(0), sc.next().charAt(0), sc.next().charAt(0)};
		Arrays.sort(c);

		System.out.println((c[0] == c[1] && c[1] != c[2]) || (c[0] != c[1] && c[1] == c[2]) ? "Yes" : "No");
	}
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		char[] c = {sc.next().charAt(0), sc.next().charAt(0), sc.next().charAt(0)};
		Arrays.sort(c);

		System.out.println((c[0] == c[1] && c[1] != c[2]) || (c[0] != c[1] && c[1] == c[2]) ? "Yes" : "No");
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		char[] c = {sc.next().charAt(0), sc.next().charAt(0), sc.next().charAt(0)};
		Arrays.sort(c);

		System.out.println((c[0] == c[1] && c[1] != c[2]) || (c[0] != c[1] && c[1] == c[2]) ? "Yes" : "No");
	} main {

		Scanner sc = new Scanner(System.in);

		char[] c = {sc.next().charAt(0), sc.next().charAt(0), sc.next().charAt(0)};
		Arrays.sort(c);

		System.out.println((c[0] == c[1] && c[1] != c[2]) || (c[0] != c[1] && c[1] == c[2]) ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] c = {sc.next().charAt(0), sc.next().charAt(0), sc.next().charAt(0)}; c {sc.next().charAt(0), sc.next().charAt(0), sc.next().charAt(0)} sc.next().charAt(0) sc.next().charAt sc.next() sc.next sc 0 sc.next().charAt(0) sc.next().charAt sc.next() sc.next sc 0 sc.next().charAt(0) sc.next().charAt sc.next() sc.next sc 0 Arrays.sort(c) Arrays.sort Arrays c System.out.println((c[0] == c[1] && c[1] != c[2]) || (c[0] != c[1] && c[1] == c[2]) ? "Yes" : "No") System.out.println System.out System System.out (c[0] == c[1] && c[1] != c[2]) || (c[0] != c[1] && c[1] == c[2]) ? "Yes" : "No" (c[0] == c[1] && c[1] != c[2]) || (c[0] != c[1] && c[1] == c[2]) (c[0] == c[1] && c[1] != c[2]) c[0] == c[1] c[0] c 0 c[1] c 1 c[1] != c[2] c[1] c 1 c[2] c 2 (c[0] != c[1] && c[1] == c[2]) c[0] != c[1] c[0] c 0 c[1] c 1 c[1] == c[2] c[1] c 1 c[2] c 2 "Yes" "No" String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		char[] c = {sc.next().charAt(0), sc.next().charAt(0), sc.next().charAt(0)};
		Arrays.sort(c);

		System.out.println((c[0] == c[1] && c[1] != c[2]) || (c[0] != c[1] && c[1] == c[2]) ? "Yes" : "No");
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		char[] c = {sc.next().charAt(0), sc.next().charAt(0), sc.next().charAt(0)};
		Arrays.sort(c);

		System.out.println((c[0] == c[1] && c[1] != c[2]) || (c[0] != c[1] && c[1] == c[2]) ? "Yes" : "No");
	}
} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		char[] c = {sc.next().charAt(0), sc.next().charAt(0), sc.next().charAt(0)};
		Arrays.sort(c);

		System.out.println((c[0] == c[1] && c[1] != c[2]) || (c[0] != c[1] && c[1] == c[2]) ? "Yes" : "No");
	}
}