挺简单的,直接看代码
import java.util.*;
public class Main{
static String f(String a){
String b=a.substring(0,a.length()/2);
String c=a.substring((a.length()+1)/2,a.length());
if(b.equals(new StringBuilder(c).reverse().toString()))
return "Yes!";
else
return "No!";
}
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
while(scan.hasNext())
System.out.println(f(scan.next()));
}
}