const Main = input => {
  const chars = input.split('')
  
  if (chars[2] === chars[3] && chars[4] === chars[5]) {
    console.log('Yes')
  } else {
    console.log('No')
  }
}

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