function main(input){
    out = 'Yes';

    if(input[2]!=input[3]){
        out = 'No';
    }
    if(input[4]!=input[5]){
        out = 'No';
    }
  console.log(out);

}

main(require("fs").readFileSync("/dev/stdin", "utf8"));