L. Repetitive Palindrome
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

You are given a string $$$s$$$ consisting of lowercase alphabets, and an integer $$$k$$$.

Make a new string $$$t$$$ by concatenating $$$k$$$ copies of $$$s$$$. Determine whether $$$t$$$ is a palindrome, e.g. is the same backward as forward.

Input

The first line contains a string $$$s$$$ consisting of lowercase alphabets. ($$$1 \le |s| \le 250000$$$)

The second line contains an integer $$$k$$$. ($$$1 \le k \le 10^{18}$$$)

Output

If $$$t$$$ is a palindrome, print YES. If not, print NO.

Examples
Input
abc
3
Output
NO
Input
abba
1
Output
YES