import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		char[] A = sc.next().toCharArray();

		Map<Character, Integer> maplst = new TreeMap<Character, Integer>() ;

		for (char c : A) {
			if (maplst.containsKey(c)) {
				maplst.put(c, maplst.get(c) + 1);
			}else {
				maplst.put(c, 1);
			}
		}
		boolean judge = true;
		if (maplst.keySet().size() == 2) {
			for (char c : maplst.keySet()) {
				if (maplst.get(c) != 2) {
					judge = !judge;
					break;
				}
			}
		}else {
			judge = !judge;
		}

		if (judge) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}
} import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.TreeMap; TreeMap java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		char[] A = sc.next().toCharArray();

		Map<Character, Integer> maplst = new TreeMap<Character, Integer>() ;

		for (char c : A) {
			if (maplst.containsKey(c)) {
				maplst.put(c, maplst.get(c) + 1);
			}else {
				maplst.put(c, 1);
			}
		}
		boolean judge = true;
		if (maplst.keySet().size() == 2) {
			for (char c : maplst.keySet()) {
				if (maplst.get(c) != 2) {
					judge = !judge;
					break;
				}
			}
		}else {
			judge = !judge;
		}

		if (judge) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		char[] A = sc.next().toCharArray();

		Map<Character, Integer> maplst = new TreeMap<Character, Integer>() ;

		for (char c : A) {
			if (maplst.containsKey(c)) {
				maplst.put(c, maplst.get(c) + 1);
			}else {
				maplst.put(c, 1);
			}
		}
		boolean judge = true;
		if (maplst.keySet().size() == 2) {
			for (char c : maplst.keySet()) {
				if (maplst.get(c) != 2) {
					judge = !judge;
					break;
				}
			}
		}else {
			judge = !judge;
		}

		if (judge) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	} main {
		Scanner sc = new Scanner(System.in);

		char[] A = sc.next().toCharArray();

		Map<Character, Integer> maplst = new TreeMap<Character, Integer>() ;

		for (char c : A) {
			if (maplst.containsKey(c)) {
				maplst.put(c, maplst.get(c) + 1);
			}else {
				maplst.put(c, 1);
			}
		}
		boolean judge = true;
		if (maplst.keySet().size() == 2) {
			for (char c : maplst.keySet()) {
				if (maplst.get(c) != 2) {
					judge = !judge;
					break;
				}
			}
		}else {
			judge = !judge;
		}

		if (judge) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] A = sc.next().toCharArray(); A sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc Map<Character, Integer> maplst = new TreeMap<Character, Integer>() ; maplst new TreeMap<Character, Integer>() for (char c : A) {
			if (maplst.containsKey(c)) {
				maplst.put(c, maplst.get(c) + 1);
			}else {
				maplst.put(c, 1);
			}
		} char c A {
			if (maplst.containsKey(c)) {
				maplst.put(c, maplst.get(c) + 1);
			}else {
				maplst.put(c, 1);
			}
		} {
			if (maplst.containsKey(c)) {
				maplst.put(c, maplst.get(c) + 1);
			}else {
				maplst.put(c, 1);
			}
		} if (maplst.containsKey(c)) {
				maplst.put(c, maplst.get(c) + 1);
			}else {
				maplst.put(c, 1);
			} maplst.containsKey(c) maplst.containsKey maplst c {
				maplst.put(c, maplst.get(c) + 1);
			} maplst.put(c, maplst.get(c) + 1) maplst.put maplst c maplst.get(c) + 1 maplst.get(c) maplst.get maplst c 1 {
				maplst.put(c, 1);
			} maplst.put(c, 1) maplst.put maplst c 1 boolean judge = true; judge true if (maplst.keySet().size() == 2) {
			for (char c : maplst.keySet()) {
				if (maplst.get(c) != 2) {
					judge = !judge;
					break;
				}
			}
		}else {
			judge = !judge;
		} maplst.keySet().size() == 2 maplst.keySet().size() maplst.keySet().size maplst.keySet() maplst.keySet maplst 2 {
			for (char c : maplst.keySet()) {
				if (maplst.get(c) != 2) {
					judge = !judge;
					break;
				}
			}
		} for (char c : maplst.keySet()) {
				if (maplst.get(c) != 2) {
					judge = !judge;
					break;
				}
			} char c maplst.keySet() maplst.keySet maplst {
				if (maplst.get(c) != 2) {
					judge = !judge;
					break;
				}
			} {
				if (maplst.get(c) != 2) {
					judge = !judge;
					break;
				}
			} if (maplst.get(c) != 2) {
					judge = !judge;
					break;
				} maplst.get(c) != 2 maplst.get(c) maplst.get maplst c 2 {
					judge = !judge;
					break;
				} judge = !judge judge !judge judge break; {
			judge = !judge;
		} judge = !judge judge !judge judge if (judge) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} judge {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		char[] A = sc.next().toCharArray();

		Map<Character, Integer> maplst = new TreeMap<Character, Integer>() ;

		for (char c : A) {
			if (maplst.containsKey(c)) {
				maplst.put(c, maplst.get(c) + 1);
			}else {
				maplst.put(c, 1);
			}
		}
		boolean judge = true;
		if (maplst.keySet().size() == 2) {
			for (char c : maplst.keySet()) {
				if (maplst.get(c) != 2) {
					judge = !judge;
					break;
				}
			}
		}else {
			judge = !judge;
		}

		if (judge) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		char[] A = sc.next().toCharArray();

		Map<Character, Integer> maplst = new TreeMap<Character, Integer>() ;

		for (char c : A) {
			if (maplst.containsKey(c)) {
				maplst.put(c, maplst.get(c) + 1);
			}else {
				maplst.put(c, 1);
			}
		}
		boolean judge = true;
		if (maplst.keySet().size() == 2) {
			for (char c : maplst.keySet()) {
				if (maplst.get(c) != 2) {
					judge = !judge;
					break;
				}
			}
		}else {
			judge = !judge;
		}

		if (judge) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}
} Main
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		char[] A = sc.next().toCharArray();

		Map<Character, Integer> maplst = new TreeMap<Character, Integer>() ;

		for (char c : A) {
			if (maplst.containsKey(c)) {
				maplst.put(c, maplst.get(c) + 1);
			}else {
				maplst.put(c, 1);
			}
		}
		boolean judge = true;
		if (maplst.keySet().size() == 2) {
			for (char c : maplst.keySet()) {
				if (maplst.get(c) != 2) {
					judge = !judge;
					break;
				}
			}
		}else {
			judge = !judge;
		}

		if (judge) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}
}
