import java.util.Scanner; import java.util.Arrays; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String r = scan.next(); int i , j; System.out.println(r.length());//输出字符串的长度 for(i = 0, j = r.length()-1 ; i <= j ; i++,j--) { if(r.charAt(i) != r.charAt(j)) { System.out.print("N"); return ; } } System.out.print("Y"); } }