import java.util.Scanner; public class Main { public static void log(Object obj) { System.out.println(obj.toString()); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); char[] c = s.toCharArray(); log(c[0] == c[1] && c[1] != c[2]?"Yes":"No"); } }