import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main{
	public static void main (String[] args) throws java.lang.Exception
	{
		
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
		int flag1=1,flag2=1,flag3=1;
		String temp="";
		int N=s.length();
      if(N%2!=0)
      {
		// to check if palindrome;
		for(int i=N-1;i>=0;i--)
		{
			char a=s.charAt(i);
			temp=temp+a;
		}
		if(temp.equals(s))
		{
			flag1=1;
		}
		else
			flag1=0;
		//System.out.print(flag);
		// 2nd condition
		
		int end=(int)((N-1)/2);
		String temp2="";
		temp="";
		for(int i=0;i<end;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=end-1;i>=0;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag2=1;
		}
		else
			flag2=0;
		//System.out.print(flag);
		//check for 3rd condition
		end=(int)((N+3)/2);
		temp2="";
		temp="";
		for(int i=end-1;i<=N-1;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=N-1;i>=end-1;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag3=1;
		}
		else
			flag3=0;
		//System.out.print(flag);
		//condition check for strong palindrome
		if(flag1==1 && flag2==1 && flag3==1)
		{
			System.out.println("Yes");
			
		}
		else
		{
			System.out.println("No");
		}
}
}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java class Main{
	public static void main (String[] args) throws java.lang.Exception
	{
		
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
		int flag1=1,flag2=1,flag3=1;
		String temp="";
		int N=s.length();
      if(N%2!=0)
      {
		// to check if palindrome;
		for(int i=N-1;i>=0;i--)
		{
			char a=s.charAt(i);
			temp=temp+a;
		}
		if(temp.equals(s))
		{
			flag1=1;
		}
		else
			flag1=0;
		//System.out.print(flag);
		// 2nd condition
		
		int end=(int)((N-1)/2);
		String temp2="";
		temp="";
		for(int i=0;i<end;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=end-1;i>=0;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag2=1;
		}
		else
			flag2=0;
		//System.out.print(flag);
		//check for 3rd condition
		end=(int)((N+3)/2);
		temp2="";
		temp="";
		for(int i=end-1;i<=N-1;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=N-1;i>=end-1;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag3=1;
		}
		else
			flag3=0;
		//System.out.print(flag);
		//condition check for strong palindrome
		if(flag1==1 && flag2==1 && flag3==1)
		{
			System.out.println("Yes");
			
		}
		else
		{
			System.out.println("No");
		}
}
}
} Main public static void main (String[] args) throws java.lang.Exception
	{
		
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
		int flag1=1,flag2=1,flag3=1;
		String temp="";
		int N=s.length();
      if(N%2!=0)
      {
		// to check if palindrome;
		for(int i=N-1;i>=0;i--)
		{
			char a=s.charAt(i);
			temp=temp+a;
		}
		if(temp.equals(s))
		{
			flag1=1;
		}
		else
			flag1=0;
		//System.out.print(flag);
		// 2nd condition
		
		int end=(int)((N-1)/2);
		String temp2="";
		temp="";
		for(int i=0;i<end;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=end-1;i>=0;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag2=1;
		}
		else
			flag2=0;
		//System.out.print(flag);
		//check for 3rd condition
		end=(int)((N+3)/2);
		temp2="";
		temp="";
		for(int i=end-1;i<=N-1;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=N-1;i>=end-1;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag3=1;
		}
		else
			flag3=0;
		//System.out.print(flag);
		//condition check for strong palindrome
		if(flag1==1 && flag2==1 && flag3==1)
		{
			System.out.println("Yes");
			
		}
		else
		{
			System.out.println("No");
		}
}
} main {
		
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
		int flag1=1,flag2=1,flag3=1;
		String temp="";
		int N=s.length();
      if(N%2!=0)
      {
		// to check if palindrome;
		for(int i=N-1;i>=0;i--)
		{
			char a=s.charAt(i);
			temp=temp+a;
		}
		if(temp.equals(s))
		{
			flag1=1;
		}
		else
			flag1=0;
		//System.out.print(flag);
		// 2nd condition
		
		int end=(int)((N-1)/2);
		String temp2="";
		temp="";
		for(int i=0;i<end;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=end-1;i>=0;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag2=1;
		}
		else
			flag2=0;
		//System.out.print(flag);
		//check for 3rd condition
		end=(int)((N+3)/2);
		temp2="";
		temp="";
		for(int i=end-1;i<=N-1;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=N-1;i>=end-1;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag3=1;
		}
		else
			flag3=0;
		//System.out.print(flag);
		//condition check for strong palindrome
		if(flag1==1 && flag2==1 && flag3==1)
		{
			System.out.println("Yes");
			
		}
		else
		{
			System.out.println("No");
		}
}
} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String s=sc.next(); s sc.next() sc.next sc int flag1=1 flag1 1 flag2=1 flag2 1 flag3=1; flag3 1 String temp=""; temp "" int N=s.length(); N s.length() s.length s if(N%2!=0)
      {
		// to check if palindrome;
		for(int i=N-1;i>=0;i--)
		{
			char a=s.charAt(i);
			temp=temp+a;
		}
		if(temp.equals(s))
		{
			flag1=1;
		}
		else
			flag1=0;
		//System.out.print(flag);
		// 2nd condition
		
		int end=(int)((N-1)/2);
		String temp2="";
		temp="";
		for(int i=0;i<end;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=end-1;i>=0;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag2=1;
		}
		else
			flag2=0;
		//System.out.print(flag);
		//check for 3rd condition
		end=(int)((N+3)/2);
		temp2="";
		temp="";
		for(int i=end-1;i<=N-1;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=N-1;i>=end-1;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag3=1;
		}
		else
			flag3=0;
		//System.out.print(flag);
		//condition check for strong palindrome
		if(flag1==1 && flag2==1 && flag3==1)
		{
			System.out.println("Yes");
			
		}
		else
		{
			System.out.println("No");
		}
} N%2!=0 N%2 N 2 0 {
		// to check if palindrome;
		for(int i=N-1;i>=0;i--)
		{
			char a=s.charAt(i);
			temp=temp+a;
		}
		if(temp.equals(s))
		{
			flag1=1;
		}
		else
			flag1=0;
		//System.out.print(flag);
		// 2nd condition
		
		int end=(int)((N-1)/2);
		String temp2="";
		temp="";
		for(int i=0;i<end;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=end-1;i>=0;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag2=1;
		}
		else
			flag2=0;
		//System.out.print(flag);
		//check for 3rd condition
		end=(int)((N+3)/2);
		temp2="";
		temp="";
		for(int i=end-1;i<=N-1;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=N-1;i>=end-1;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag3=1;
		}
		else
			flag3=0;
		//System.out.print(flag);
		//condition check for strong palindrome
		if(flag1==1 && flag2==1 && flag3==1)
		{
			System.out.println("Yes");
			
		}
		else
		{
			System.out.println("No");
		}
} for(int i=N-1;i>=0;i--)
		{
			char a=s.charAt(i);
			temp=temp+a;
		} int i=N-1; int i=N-1; i N-1 N 1 i>=0 i 0 i-- i-- i {
			char a=s.charAt(i);
			temp=temp+a;
		} {
			char a=s.charAt(i);
			temp=temp+a;
		} char a=s.charAt(i); a s.charAt(i) s.charAt s i temp=temp+a temp temp+a temp a if(temp.equals(s))
		{
			flag1=1;
		}
		else
			flag1=0; temp.equals(s) temp.equals temp s {
			flag1=1;
		} flag1=1 flag1 1 flag1=0 flag1 0 int end=(int)((N-1)/2); end (int)((N-1)/2) (N-1) N 1 2 String temp2=""; temp2 "" temp="" temp "" for(int i=0;i<end;i++)
		{
			temp2=temp2+s.charAt(i);
		} int i=0; int i=0; i 0 i<end i end i++ i++ i {
			temp2=temp2+s.charAt(i);
		} {
			temp2=temp2+s.charAt(i);
		} temp2=temp2+s.charAt(i) temp2 temp2+s.charAt(i) temp2 s.charAt(i) s.charAt s i for(int i=end-1;i>=0;i--)
		{
			temp=temp+s.charAt(i);
		} int i=end-1; int i=end-1; i end-1 end 1 i>=0 i 0 i-- i-- i {
			temp=temp+s.charAt(i);
		} {
			temp=temp+s.charAt(i);
		} temp=temp+s.charAt(i) temp temp+s.charAt(i) temp s.charAt(i) s.charAt s i if(temp2.equals(temp))
		{
			flag2=1;
		}
		else
			flag2=0; temp2.equals(temp) temp2.equals temp2 temp {
			flag2=1;
		} flag2=1 flag2 1 flag2=0 flag2 0 end=(int)((N+3)/2) end (int)((N+3)/2) (N+3) N 3 2 temp2="" temp2 "" temp="" temp "" for(int i=end-1;i<=N-1;i++)
		{
			temp2=temp2+s.charAt(i);
		} int i=end-1; int i=end-1; i end-1 end 1 i<=N-1 i N-1 N 1 i++ i++ i {
			temp2=temp2+s.charAt(i);
		} {
			temp2=temp2+s.charAt(i);
		} temp2=temp2+s.charAt(i) temp2 temp2+s.charAt(i) temp2 s.charAt(i) s.charAt s i for(int i=N-1;i>=end-1;i--)
		{
			temp=temp+s.charAt(i);
		} int i=N-1; int i=N-1; i N-1 N 1 i>=end-1 i end-1 end 1 i-- i-- i {
			temp=temp+s.charAt(i);
		} {
			temp=temp+s.charAt(i);
		} temp=temp+s.charAt(i) temp temp+s.charAt(i) temp s.charAt(i) s.charAt s i if(temp2.equals(temp))
		{
			flag3=1;
		}
		else
			flag3=0; temp2.equals(temp) temp2.equals temp2 temp {
			flag3=1;
		} flag3=1 flag3 1 flag3=0 flag3 0 if(flag1==1 && flag2==1 && flag3==1)
		{
			System.out.println("Yes");
			
		}
		else
		{
			System.out.println("No");
		} flag1==1 && flag2==1 && flag3==1 flag1==1 && flag2==1 && flag3==1 flag1==1 flag1 1 flag2==1 flag2 1 flag3==1 flag3 1 {
			System.out.println("Yes");
			
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args
import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main{
	public static void main (String[] args) throws java.lang.Exception
	{
		
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
		int flag1=1,flag2=1,flag3=1;
		String temp="";
		int N=s.length();
      if(N%2!=0)
      {
		// to check if palindrome;
		for(int i=N-1;i>=0;i--)
		{
			char a=s.charAt(i);
			temp=temp+a;
		}
		if(temp.equals(s))
		{
			flag1=1;
		}
		else
			flag1=0;
		//System.out.print(flag);
		// 2nd condition
		
		int end=(int)((N-1)/2);
		String temp2="";
		temp="";
		for(int i=0;i<end;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=end-1;i>=0;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag2=1;
		}
		else
			flag2=0;
		//System.out.print(flag);
		//check for 3rd condition
		end=(int)((N+3)/2);
		temp2="";
		temp="";
		for(int i=end-1;i<=N-1;i++)
		{
			temp2=temp2+s.charAt(i);
		}
		for(int i=N-1;i>=end-1;i--)
		{
			temp=temp+s.charAt(i);
		}
		if(temp2.equals(temp))
		{
			flag3=1;
		}
		else
			flag3=0;
		//System.out.print(flag);
		//condition check for strong palindrome
		if(flag1==1 && flag2==1 && flag3==1)
		{
			System.out.println("Yes");
			
		}
		else
		{
			System.out.println("No");
		}
}
}
}