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.
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}$$$)
If $$$t$$$ is a palindrome, print YES. If not, print NO.
abc
3
NO
abba
1
YES
| Название |
|---|


