function main(input) {
  const inputs = input.split('\n')
  const [S] = inputs[0].split(' ')
  console.log(S[2] === S[3] && S[4] === S[5] ?
   'Yes' : 'No'
  )

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

