s = raw_input() k = input() n = len(s) if n % k != 0: print "NO"; else: for i in range(0, n, n / k): if s[i:i + n / k] != s[i + n / k - 1:i:-1] + s[i]: print "NO" break else: print "YES"
Standard input is empty
Standard output is empty
Traceback (most recent call last): File "prog.py", line 1, in <module> EOFError: EOF when reading a line