text = list(map(str, input())) index = 0 flag = False for i in text: if index >= len(text) - 1: break if i == text[index + 1]: print(i) print(text[index + 1]) flag = True print("YES") break index += 1 if flag == False: print("NO")