Problem:
Score : 100 points

Problem Statement

A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.

Given a string S, determine whether it is coffee-like.

Constraints

S is a string of length 6 consisting of lowercase English letters.

Input

Input is given from Standard Input in the following format:

S

Output

If S is coffee-like, print Yes; otherwise, print No.

Sample Input 1

sippuu

Sample Output 1

Yes

In sippuu, the 3-rd and 4-th characters are equal, and the 5-th and 6-th characters are also equal.

Sample Input 2

iphone

Sample Output 2

No

Sample Input 3

coffee

Sample Output 3

Yes

Solution in Rust (1.15.1) (judge verdict: Runtime Error)

use std::io::{self, BufReader, Read};

// fn read_line() -> String {
//     let mut s = String::new();
//     std::io::stdin().read_line(&mut s).unwrap();
//     s
// }

// fn split_whitespace(line: String) -> Vec<u32> {
//     line.split_whitespace()
//         .map(|s| s.parse().unwrap())
//         .collect()
// }

// fn reader() -> Vec<usize> {
//     let mut buffer = String::new();
//     io::stdin().read_to_string(&mut buffer);

//     let st: Vec<&str> = buffer.lines().collect();

//     let s: Vec<&str> = st.get(1).unwrap().clone().split_terminator(" ").collect();

//     s.iter()
//         .map(|v| v.trim().parse::<usize>().unwrap())
//         .collect()
// }

// fn solver(mut hs: Vec<usize>) -> usize {
//     let mut v: Vec<usize> = vec![0; hs.len()];;

//     for i in 1..hs.len() {
//         if hs[i - 1] >= hs[i] {
//             v[i] = v[i - 1] + 1;
//         }
//     }

//     let max = v.iter().max().unwrap().clone();
//     println!("{}", max);
//     max
// }

pub struct IO<R, W: std::io::Write>(R, std::io::BufWriter<W>);

impl<R: std::io::Read, W: std::io::Write> IO<R, W> {
    pub fn new(r: R, w: W) -> IO<R, W> {
        IO(r, std::io::BufWriter::new(w))
    }
    pub fn write<S: ToString>(&mut self, s: S) {
        use std::io::Write;
        self.1.write(s.to_string().as_bytes()).unwrap();
    }
    pub fn read<T: std::str::FromStr>(&mut self) -> T {
        use std::io::Read;
        let buf = self
            .0
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .skip_while(|&b| b == b' ' || b == b'\n' || b == b'\r' || b == b'\t')
            .take_while(|&b| b != b' ' && b != b'\n' && b != b'\r' && b != b'\t')
            .collect::<Vec<_>>();
        unsafe { std::str::from_utf8_unchecked(&buf) }
            .parse()
            .ok()
            .expect("Parse error.")
    }
    pub fn vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read()).collect()
    }
    pub fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
}

fn eval_ds(ds: Vec<usize>) -> Vec<usize> {
    let mut v = Vec::new();
    for sl in ds.windows(2) {
        v.push(sl[1] - sl[0]);
    }
    v
}

fn main() {
    let mut sc = IO::new(std::io::stdin(), std::io::stdout());
    let p: usize = sc.read();
    let h_n: usize = sc.read();
    let mut ds: Vec<usize> = sc.vec(h_n);
    ds.sort();
    ds.push(p);

    let evld = eval_ds(ds);
    let max = evld.iter().max().unwrap();

    sc.write(max);
    // sc.write()
    // let hs = reader();

    // solver(hs);
}

#[test]
fn evls() {
    let v = vec![0, 5, 15, 20];

    let ds = eval_ds(v);
    println!("{:?}", ds);
    println!("foo");

    assert_eq!(1, 2);
}

// #[cfg(test)]
// mod tests {
//     use super::*;

//     #[test]
//     fn fst() {
//         assert_eq!(solver(vec![4, 4, 5, 6, 6, 5, 5]), 3);
//     }

//     #[test]
//     fn snd() {
//         assert_eq!(solver(vec![10, 4, 8, 7, 3]), 2);
//     }

//     #[test]
//     fn thrd() {
//         assert_eq!(solver(vec![1, 2, 3, 4]), 0);
//         assert_eq!(solver(vec![1, 2]), 0);
//     }
// }