const main = stdin => {
  const S = stdin.trim()
  if (S[2] === S[3] && S[4] === S[5]) {
    console.log('Yes')
  } else {
    console.log('No')
  }
}

// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
