import java.io.*;
import java.util.*;

public class Main{
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		char[] alphabet = {'A' , 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M' , 'N', 'O', 'P', 'Q' , 'R', 'S', 'T', 'U', 'V', 'W', 'X','Y','Z'};
		String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		int[] freqArr = new int[alphabet.length];
		String S = sc.nextLine();
		for (int i = 0; i < 4; i++) {
			freqArr[alpha.indexOf(S.charAt(i))]++;
		}
		int cnt = 0;
		for(int i : freqArr){
			if(i >= 2){
				cnt++;
			}
			if(cnt >= 2){
				System.out.println("Yes");
				System.exit(0);
			}
		}
		System.out.println("No");
	}


static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public boolean ready() throws IOException {return br.ready();}

		public double nextDouble(String x)
		{

			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}


	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		char[] alphabet = {'A' , 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M' , 'N', 'O', 'P', 'Q' , 'R', 'S', 'T', 'U', 'V', 'W', 'X','Y','Z'};
		String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		int[] freqArr = new int[alphabet.length];
		String S = sc.nextLine();
		for (int i = 0; i < 4; i++) {
			freqArr[alpha.indexOf(S.charAt(i))]++;
		}
		int cnt = 0;
		for(int i : freqArr){
			if(i >= 2){
				cnt++;
			}
			if(cnt >= 2){
				System.out.println("Yes");
				System.exit(0);
			}
		}
		System.out.println("No");
	}


static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public boolean ready() throws IOException {return br.ready();}

		public double nextDouble(String x)
		{

			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}


	}
} Main public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		char[] alphabet = {'A' , 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M' , 'N', 'O', 'P', 'Q' , 'R', 'S', 'T', 'U', 'V', 'W', 'X','Y','Z'};
		String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		int[] freqArr = new int[alphabet.length];
		String S = sc.nextLine();
		for (int i = 0; i < 4; i++) {
			freqArr[alpha.indexOf(S.charAt(i))]++;
		}
		int cnt = 0;
		for(int i : freqArr){
			if(i >= 2){
				cnt++;
			}
			if(cnt >= 2){
				System.out.println("Yes");
				System.exit(0);
			}
		}
		System.out.println("No");
	} main {
		Scanner sc = new Scanner(System.in);
		char[] alphabet = {'A' , 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M' , 'N', 'O', 'P', 'Q' , 'R', 'S', 'T', 'U', 'V', 'W', 'X','Y','Z'};
		String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		int[] freqArr = new int[alphabet.length];
		String S = sc.nextLine();
		for (int i = 0; i < 4; i++) {
			freqArr[alpha.indexOf(S.charAt(i))]++;
		}
		int cnt = 0;
		for(int i : freqArr){
			if(i >= 2){
				cnt++;
			}
			if(cnt >= 2){
				System.out.println("Yes");
				System.exit(0);
			}
		}
		System.out.println("No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] alphabet = {'A' , 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M' , 'N', 'O', 'P', 'Q' , 'R', 'S', 'T', 'U', 'V', 'W', 'X','Y','Z'}; alphabet {'A' , 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M' , 'N', 'O', 'P', 'Q' , 'R', 'S', 'T', 'U', 'V', 'W', 'X','Y','Z'} 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z' String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; alpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ" int[] freqArr = new int[alphabet.length]; freqArr new int[alphabet.length] alphabet.length alphabet alphabet.length String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc for (int i = 0; i < 4; i++) {
			freqArr[alpha.indexOf(S.charAt(i))]++;
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			freqArr[alpha.indexOf(S.charAt(i))]++;
		} {
			freqArr[alpha.indexOf(S.charAt(i))]++;
		} freqArr[alpha.indexOf(S.charAt(i))]++ freqArr[alpha.indexOf(S.charAt(i))] freqArr alpha.indexOf(S.charAt(i)) alpha.indexOf alpha S.charAt(i) S.charAt S i int cnt = 0; cnt 0 for(int i : freqArr){
			if(i >= 2){
				cnt++;
			}
			if(cnt >= 2){
				System.out.println("Yes");
				System.exit(0);
			}
		} int i freqArr {
			if(i >= 2){
				cnt++;
			}
			if(cnt >= 2){
				System.out.println("Yes");
				System.exit(0);
			}
		} {
			if(i >= 2){
				cnt++;
			}
			if(cnt >= 2){
				System.out.println("Yes");
				System.exit(0);
			}
		} if(i >= 2){
				cnt++;
			} i >= 2 i 2 {
				cnt++;
			} cnt++ cnt if(cnt >= 2){
				System.out.println("Yes");
				System.exit(0);
			} cnt >= 2 cnt 2 {
				System.out.println("Yes");
				System.exit(0);
			} System.out.println("Yes") System.out.println System.out System System.out "Yes" System.exit(0) System.exit System 0 System.out.println("No") System.out.println System.out System System.out "No" String[] args args static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public boolean ready() throws IOException {return br.ready();}

		public double nextDouble(String x)
		{

			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}


	} Scanner StringTokenizer st; st BufferedReader br; br public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));} Scanner {	br = new BufferedReader(new InputStreamReader(s));} br = new BufferedReader(new InputStreamReader(s)) br new BufferedReader(new InputStreamReader(s)) InputStream s s public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		} next {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		} while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() throws IOException {return Integer.parseInt(next());} nextInt {return Integer.parseInt(next());} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() throws IOException {return Long.parseLong(next());} nextLong {return Long.parseLong(next());} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public String nextLine() throws IOException {return br.readLine();} nextLine {return br.readLine();} return br.readLine(); br.readLine() br.readLine br public boolean ready() throws IOException {return br.ready();} ready {return br.ready();} return br.ready(); br.ready() br.ready br public double nextDouble(String x)
		{

			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		} nextDouble {

			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		} StringBuilder sb = new StringBuilder("0"); sb new StringBuilder("0") double res = 0 res 0 f = 1; f 1 boolean dec = false dec false neg = false; neg false int start = 0; start 0 if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			} x.charAt(0) == '-' x.charAt(0) x.charAt x 0 '-' {
				neg = true;
				start++;
			} neg = true neg true start++ start for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				} int i = start; int i = start; i start i < x.length() i x.length() x.length x i++ i++ i if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				} if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				} x.charAt(i) == '.' x.charAt(i) x.charAt x i '.' {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} res = Long.parseLong(sb.toString()) res Long.parseLong(sb.toString()) Long.parseLong Long sb.toString() sb.toString sb sb = new StringBuilder("0") sb new StringBuilder("0") dec = true dec true {
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				} sb.append(x.charAt(i)) sb.append sb x.charAt(i) x.charAt x i if(dec)
						f *= 10; dec f *= 10 f 10 res += Long.parseLong(sb.toString()) / f res Long.parseLong(sb.toString()) / f Long.parseLong(sb.toString()) Long.parseLong Long sb.toString() sb.toString sb f return res * (neg?-1:1); res * (neg?-1:1) res (neg?-1:1) neg -1 1 1 String x x public class Main{
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		char[] alphabet = {'A' , 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M' , 'N', 'O', 'P', 'Q' , 'R', 'S', 'T', 'U', 'V', 'W', 'X','Y','Z'};
		String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		int[] freqArr = new int[alphabet.length];
		String S = sc.nextLine();
		for (int i = 0; i < 4; i++) {
			freqArr[alpha.indexOf(S.charAt(i))]++;
		}
		int cnt = 0;
		for(int i : freqArr){
			if(i >= 2){
				cnt++;
			}
			if(cnt >= 2){
				System.out.println("Yes");
				System.exit(0);
			}
		}
		System.out.println("No");
	}


static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public boolean ready() throws IOException {return br.ready();}

		public double nextDouble(String x)
		{

			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}


	}
} public class Main{
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		char[] alphabet = {'A' , 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M' , 'N', 'O', 'P', 'Q' , 'R', 'S', 'T', 'U', 'V', 'W', 'X','Y','Z'};
		String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		int[] freqArr = new int[alphabet.length];
		String S = sc.nextLine();
		for (int i = 0; i < 4; i++) {
			freqArr[alpha.indexOf(S.charAt(i))]++;
		}
		int cnt = 0;
		for(int i : freqArr){
			if(i >= 2){
				cnt++;
			}
			if(cnt >= 2){
				System.out.println("Yes");
				System.exit(0);
			}
		}
		System.out.println("No");
	}


static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public boolean ready() throws IOException {return br.ready();}

		public double nextDouble(String x)
		{

			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}


	}
} Main
import java.io.*;
import java.util.*;

public class Main{
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		char[] alphabet = {'A' , 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M' , 'N', 'O', 'P', 'Q' , 'R', 'S', 'T', 'U', 'V', 'W', 'X','Y','Z'};
		String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		int[] freqArr = new int[alphabet.length];
		String S = sc.nextLine();
		for (int i = 0; i < 4; i++) {
			freqArr[alpha.indexOf(S.charAt(i))]++;
		}
		int cnt = 0;
		for(int i : freqArr){
			if(i >= 2){
				cnt++;
			}
			if(cnt >= 2){
				System.out.println("Yes");
				System.exit(0);
			}
		}
		System.out.println("No");
	}


static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public boolean ready() throws IOException {return br.ready();}

		public double nextDouble(String x)
		{

			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}


	}
}