require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
}).on('line', function(line) {
  if (line[2] === line[3] && line[4] === line[5]) {
    console.log('Yes');
  } else {
    console.log('No');
  }
});
