You are given a string consisting of lowercase alphabets, and an integer .
Make a new string by concatenating copies of . Determine whether is a palindrome, e.g. is the same backward as forward.
The first line contains a string consisting of lowercase alphabets. ()
The second line contains an integer . ()
If is a palindrome, print . If not, print .
abc 3
NO
abba 1
YES