logo AlgoBeat OnlineJudge
登录 注册

#214711. [2018 KAIST RUN Fall] Repetitive Palindrome

内存限制:1024 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

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 .

样例

样例输入 1

abc
3

样例输出 1

NO

样例输入 2

abba
1

样例输出 2

YES