a,b,c = input() print('Yes' if a==b and b!=c else 'No')