"use strict";

const main = arg => {
  const input = arg.trim();

  const N = parseInt(input[0]);
  if (N[2] === N[3] && N[4] === N[5]) {
    return "Yes"
  } 
  return "No";
  
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));  
