import sys from collections import defaultdict s = input() n = len(s) if n < 2: print("NO") sys.exit() d = defaultdict(list)