While Mike was walking in the subway, all the stuff in his back-bag dropped on the ground. There were several fax messages among them. He concatenated these strings in some order and now he has string *s*.

He is not sure if this is his own back-bag or someone else's. He remembered that there were exactly *k* messages in his own bag, each was a palindrome string and all those strings had the same length.

He asked you to help him and tell him if he has worn his own back-bag. Check if the given string *s* is a concatenation of *k* palindromes of the same length.
The first line of input contains string *s* containing lowercase English letters (1 ≤ |*s*| ≤ 1000).

The second line contains integer *k* (1 ≤ *k* ≤ 1000).
from tkinter import *

p    = [300,400,"green"]
line = [20,5]
"""
def move(self):
    canvas.create_line(p[0],p[1],p[0],p[1] - line[0],width=line[1],fill=p[2])
    p[1] -= line[0]

"""
def Up(self):
    canvas.create_line(p[0],p[1],p[0],p[1] - line[0],width=line[1],fill=p[2])
    p[1] -= line[0]
def Down(self):
    canvas.create_line(p[0],p[1],p[0],p[1] + line[0],width=line[1],fill=p[2])
    p[1] += line[0]
def Left(self):
    canvas.create_line(p[0],p[1],p[0] - line[0],p[1],width=line[1],fill=p[2])
    p[0] -= line[0]
def Right(self):
    canvas.create_line(p[0],p[1],p[0] + line[0],p[1],width=line[1],fill=p[2])
    p[0] += line[0]
def erase(self):
    canvas.delete(ALL)
"""
CREATING A WINDOW
"""
#Initial values
height = 400
width  = 600
color  = "black"
#Start-up
window = Tk()
window.title("Dinh Dinh!")

#Start window sheet: Canvas
canvas = Canvas(bg=color,height=height,width=width,highlightthickness=0)
canvas.pack()

"""Drawing"""
window.bind("<Up>",Up)
window.bind("<Down>",Down)
window.bind("<Left>",Left)
window.bind("<Right>",Right)
window.bind("u",erase)
#Start window
window.mainloop()

"""
End of Window Creation
"""

