Problem:
Score : 200 points

Problem Statement

A string S of an odd length is said to be a strong palindrome if and only if all of the following conditions are satisfied:

S is a palindrome.

Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome.

The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome.

Determine whether S is a strong palindrome.

Constraints

S consists of lowercase English letters.

The length of S is an odd number between 3 and 99 (inclusive).

Input

Input is given from Standard Input in the following format:

S

Output

If S is a strong palindrome, print Yes;
otherwise, print No.

Sample Input 1

akasaka

Sample Output 1

Yes

S is akasaka.

The string formed by the 1-st through the 3-rd characters is aka.

The string formed by the 5-th through the 7-th characters is aka.
All of these are palindromes, so S is a strong palindrome.

Sample Input 2

level

Sample Output 2

No

Sample Input 3

atcoder

Sample Output 3

No

Solution in Rust (1.15.1) (judge verdict: Wrong Answer)

fn main() {
    let mut rd = acio::Reader::from_stdin();
    let s: String = rd.read();
    let sc: Vec<char> = s.chars().collect();
    let fst = &sc[..(s.len() / 2)];
    let snd = &sc[(s.len() / 2) + 1..];
    let mut fsr = Vec::from(fst);
    fsr.reverse();
    let mut snr = Vec::from(snd);
    snr.reverse();
    //println!("{:?}-{:?} {:?}-{:?}", fst, fsr, snd, snr);
    if fst == &fsr[..] && snd == &snr[..] {
        println!("Yes");
    } else {
        println!("No");
    }
}

//-- MODULES --

/// Mathematics Module
#[allow(dead_code)]
mod math {
    use std::mem::swap;

    /// Methods for Each Integer Type
    pub trait Integer {}
    /// Implements trait Integer
    macro_rules! integer {
        ($t:ty) => {
            impl Integer for $t {
                // NOTHING...
            }
        };
    }

    /// Methods for Each Natural Integer Type
    pub trait Natural {
        fn lcm(v1: Self, v2: Self) -> Self;
        fn gcd(v1: Self, v2: Self) -> Self;
    }
    /// Implements trait Natural
    macro_rules! natural {
        ($t:ty) => {
            impl Natural for $t {
                fn lcm(v1: $t, v2: $t) -> $t {
                    v1 * v2 / Self::gcd(v1, v2)
                }

                fn gcd(v1: $t, v2: $t) -> $t {
                    let (mut v1, mut v2) = (v1, v2);
                    if v1 < v2 {
                        swap(&mut v1, &mut v2);
                    }
                    while v2 != 0 {
                        let t = v1;
                        v1 = v2;
                        v2 = t % v2;
                    }
                    return v1;
                }
            }
        };
    }

    // BEGIN DECLARATIONS
    integer!(i8);
    integer!(i16);
    integer!(i32);
    integer!(i64);
    integer!(isize);
    integer!(u8);
    integer!(u16);
    integer!(u32);
    integer!(u64);
    integer!(usize);
    // ---
    natural!(u8);
    natural!(u16);
    natural!(u32);
    natural!(u64);
    natural!(usize);
    // END DECLARATIONS
}

/// IO Module for AtCoder
#[allow(dead_code)]
mod acio {
    use std::fmt::Debug;
    use std::io::{stdin, BufRead, BufReader, Read, Stdin};
    use std::str::FromStr;

    /// Multi-Purpose Value Reader
    pub struct Reader<R>
    where
        R: Read,
    {
        input: BufReader<R>,
        stack: Vec<String>,
    }

    impl<R: Read> Reader<R> {
        /// Create Reader from Read
        pub fn new<T>(input: R) -> Self {
            // Self { // <- Warning: NOT YET on AtCoder
            Reader {
                input: BufReader::new(input),
                stack: vec![],
            }
        }

        /// Read Multiple Value
        pub fn read_by<F>(&mut self, count: usize) -> Vec<F>
        where
            F: FromStr,
            <F as FromStr>::Err: Debug,
        {
            (0..count).map(|_| self.read()).collect()
        }

        /// Read Single Value
        pub fn read<F>(&mut self) -> F
        where
            F: FromStr,
            <F as FromStr>::Err: Debug,
        {
            while self.stack.is_empty() {
                let mut line = self.read_line();
                self.stack.append(&mut line);
                self.stack.reverse();
            }
            self.stack.pop().unwrap().parse().unwrap()
        }

        /// Read Space Split Line
        fn read_line(&mut self) -> Vec<String> {
            let mut buf = String::new();
            self.input.read_line(&mut buf).unwrap();
            buf.split_whitespace().map(|s| s.to_string()).collect()
        }
    }

    impl Reader<Stdin> {
        /// Create Reader from stdin
        pub fn from_stdin() -> Self {
            Self::new::<Reader<Stdin>>(stdin())
        }
    }

    /*
    impl<T> Drop for Reader<T> {
        /// FOR DEBUG
        fn drop(&mut self) {
            if self.stack.len() != 0 {
                panic!("Reader with remaining value is dropped.")
            }
        }
    }
    */
}