fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let s: &str = s.trim().split('\n').next().unwrap().trim(); let n = s.len(); println!("{}", if &s[0..n/2] == &s[n/2..n] {"YES"} else {"NO"}) }