w = input() c = len(w) if c % 2 != 0: print('NO') else: n = int(c/2) if w.count(w[:n]) == 2: print('YES') else: print('NO')