import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	static final PrintStream out = System.out;
	static Scanner sc = new Scanner(System.in);
	static final long Mod = 1000_000_007L;
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		System.exit(0);
	}

	void solve() {
		String S = next();
		char[] cArray = S.toCharArray();

		String res = "No";
		for(int i=1;i<cArray.length;i++) {
			if(cArray[0] == cArray[i]) {
				int ti = 0,tj = 0;
				if(i == 1) {
					ti = 2;
					tj = 3;
				}
				if(i == 2) {
					ti = 1;
					tj = 3;
				}
				if(i == 3) {
					ti = 1;
					tj = 2;
				}
				if(cArray[ti] == cArray[tj]) {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				}
			}
		}

		out.println(res);
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}
	public long nextLong() {
		return Long.parseLong(next());
	}
	public String next() {
		return sc.next();
	}
} import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util public class Main {
	static final PrintStream out = System.out;
	static Scanner sc = new Scanner(System.in);
	static final long Mod = 1000_000_007L;
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		System.exit(0);
	}

	void solve() {
		String S = next();
		char[] cArray = S.toCharArray();

		String res = "No";
		for(int i=1;i<cArray.length;i++) {
			if(cArray[0] == cArray[i]) {
				int ti = 0,tj = 0;
				if(i == 1) {
					ti = 2;
					tj = 3;
				}
				if(i == 2) {
					ti = 1;
					tj = 3;
				}
				if(i == 3) {
					ti = 1;
					tj = 2;
				}
				if(cArray[ti] == cArray[tj]) {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				}
			}
		}

		out.println(res);
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}
	public long nextLong() {
		return Long.parseLong(next());
	}
	public String next() {
		return sc.next();
	}
} Main static final PrintStream out = System.out; out System.out System System.out static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) static final long Mod = 1000_000_007L; Mod 1000_000_007L public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		System.exit(0);
	} main {
		Main main = new Main();
		main.solve();
		System.exit(0);
	} Main main = new Main(); main new Main() main.solve() main.solve main System.exit(0) System.exit System 0 String[] args args void solve() {
		String S = next();
		char[] cArray = S.toCharArray();

		String res = "No";
		for(int i=1;i<cArray.length;i++) {
			if(cArray[0] == cArray[i]) {
				int ti = 0,tj = 0;
				if(i == 1) {
					ti = 2;
					tj = 3;
				}
				if(i == 2) {
					ti = 1;
					tj = 3;
				}
				if(i == 3) {
					ti = 1;
					tj = 2;
				}
				if(cArray[ti] == cArray[tj]) {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				}
			}
		}

		out.println(res);
	} solve {
		String S = next();
		char[] cArray = S.toCharArray();

		String res = "No";
		for(int i=1;i<cArray.length;i++) {
			if(cArray[0] == cArray[i]) {
				int ti = 0,tj = 0;
				if(i == 1) {
					ti = 2;
					tj = 3;
				}
				if(i == 2) {
					ti = 1;
					tj = 3;
				}
				if(i == 3) {
					ti = 1;
					tj = 2;
				}
				if(cArray[ti] == cArray[tj]) {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				}
			}
		}

		out.println(res);
	} String S = next(); S next() next char[] cArray = S.toCharArray(); cArray S.toCharArray() S.toCharArray S String res = "No"; res "No" for(int i=1;i<cArray.length;i++) {
			if(cArray[0] == cArray[i]) {
				int ti = 0,tj = 0;
				if(i == 1) {
					ti = 2;
					tj = 3;
				}
				if(i == 2) {
					ti = 1;
					tj = 3;
				}
				if(i == 3) {
					ti = 1;
					tj = 2;
				}
				if(cArray[ti] == cArray[tj]) {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				}
			}
		} int i=1; int i=1; i 1 i<cArray.length i cArray.length cArray cArray.length i++ i++ i {
			if(cArray[0] == cArray[i]) {
				int ti = 0,tj = 0;
				if(i == 1) {
					ti = 2;
					tj = 3;
				}
				if(i == 2) {
					ti = 1;
					tj = 3;
				}
				if(i == 3) {
					ti = 1;
					tj = 2;
				}
				if(cArray[ti] == cArray[tj]) {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				}
			}
		} {
			if(cArray[0] == cArray[i]) {
				int ti = 0,tj = 0;
				if(i == 1) {
					ti = 2;
					tj = 3;
				}
				if(i == 2) {
					ti = 1;
					tj = 3;
				}
				if(i == 3) {
					ti = 1;
					tj = 2;
				}
				if(cArray[ti] == cArray[tj]) {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				}
			}
		} if(cArray[0] == cArray[i]) {
				int ti = 0,tj = 0;
				if(i == 1) {
					ti = 2;
					tj = 3;
				}
				if(i == 2) {
					ti = 1;
					tj = 3;
				}
				if(i == 3) {
					ti = 1;
					tj = 2;
				}
				if(cArray[ti] == cArray[tj]) {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				}
			} cArray[0] == cArray[i] cArray[0] cArray 0 cArray[i] cArray i {
				int ti = 0,tj = 0;
				if(i == 1) {
					ti = 2;
					tj = 3;
				}
				if(i == 2) {
					ti = 1;
					tj = 3;
				}
				if(i == 3) {
					ti = 1;
					tj = 2;
				}
				if(cArray[ti] == cArray[tj]) {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				}
			} int ti = 0 ti 0 tj = 0; tj 0 if(i == 1) {
					ti = 2;
					tj = 3;
				} i == 1 i 1 {
					ti = 2;
					tj = 3;
				} ti = 2 ti 2 tj = 3 tj 3 if(i == 2) {
					ti = 1;
					tj = 3;
				} i == 2 i 2 {
					ti = 1;
					tj = 3;
				} ti = 1 ti 1 tj = 3 tj 3 if(i == 3) {
					ti = 1;
					tj = 2;
				} i == 3 i 3 {
					ti = 1;
					tj = 2;
				} ti = 1 ti 1 tj = 2 tj 2 if(cArray[ti] == cArray[tj]) {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				} cArray[ti] == cArray[tj] cArray[ti] cArray ti cArray[tj] cArray tj {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				} if(cArray[ti] != cArray[i]) {
						res = "Yes";
					} cArray[ti] != cArray[i] cArray[ti] cArray ti cArray[i] cArray i {
						res = "Yes";
					} res = "Yes" res "Yes" out.println(res) out.println out res public int nextInt() {
		return Integer.parseInt(next());
	} nextInt {
		return Integer.parseInt(next());
	} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() {
		return Long.parseLong(next());
	} nextLong {
		return Long.parseLong(next());
	} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public String next() {
		return sc.next();
	} next {
		return sc.next();
	} return sc.next(); sc.next() sc.next sc public class Main {
	static final PrintStream out = System.out;
	static Scanner sc = new Scanner(System.in);
	static final long Mod = 1000_000_007L;
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		System.exit(0);
	}

	void solve() {
		String S = next();
		char[] cArray = S.toCharArray();

		String res = "No";
		for(int i=1;i<cArray.length;i++) {
			if(cArray[0] == cArray[i]) {
				int ti = 0,tj = 0;
				if(i == 1) {
					ti = 2;
					tj = 3;
				}
				if(i == 2) {
					ti = 1;
					tj = 3;
				}
				if(i == 3) {
					ti = 1;
					tj = 2;
				}
				if(cArray[ti] == cArray[tj]) {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				}
			}
		}

		out.println(res);
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}
	public long nextLong() {
		return Long.parseLong(next());
	}
	public String next() {
		return sc.next();
	}
} public class Main {
	static final PrintStream out = System.out;
	static Scanner sc = new Scanner(System.in);
	static final long Mod = 1000_000_007L;
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		System.exit(0);
	}

	void solve() {
		String S = next();
		char[] cArray = S.toCharArray();

		String res = "No";
		for(int i=1;i<cArray.length;i++) {
			if(cArray[0] == cArray[i]) {
				int ti = 0,tj = 0;
				if(i == 1) {
					ti = 2;
					tj = 3;
				}
				if(i == 2) {
					ti = 1;
					tj = 3;
				}
				if(i == 3) {
					ti = 1;
					tj = 2;
				}
				if(cArray[ti] == cArray[tj]) {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				}
			}
		}

		out.println(res);
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}
	public long nextLong() {
		return Long.parseLong(next());
	}
	public String next() {
		return sc.next();
	}
} Main
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	static final PrintStream out = System.out;
	static Scanner sc = new Scanner(System.in);
	static final long Mod = 1000_000_007L;
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		System.exit(0);
	}

	void solve() {
		String S = next();
		char[] cArray = S.toCharArray();

		String res = "No";
		for(int i=1;i<cArray.length;i++) {
			if(cArray[0] == cArray[i]) {
				int ti = 0,tj = 0;
				if(i == 1) {
					ti = 2;
					tj = 3;
				}
				if(i == 2) {
					ti = 1;
					tj = 3;
				}
				if(i == 3) {
					ti = 1;
					tj = 2;
				}
				if(cArray[ti] == cArray[tj]) {
					if(cArray[ti] != cArray[i]) {
						res = "Yes";
					}
				}
			}
		}

		out.println(res);
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}
	public long nextLong() {
		return Long.parseLong(next());
	}
	public String next() {
		return sc.next();
	}
}