process.stdin.resume();
process.stdin.setEncoding('utf8');

var input_string = "";

var reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
reader.on('line', (line) => {
    input_string = line;
});

reader.on('close', () => {

    if( (input_string[2] == input_string[3])
     && (input_string[4] == input_string[5])){
         console.log('Yes');
     }else{
         console.log('No');
     }

});
