S = input() if len(S) == 1:print('NO') elif len(S) == 2: if S[0] == S[1]:print('YES') else:print('NO') else:print('YES')