// input
function main(input) {
    const args = input.split('\n')[0];
    const char = args.split('');
    if (char[2] == char[3] && char[4] === char[5]) {
        console.log('Yes');
    } else {
        console.log('No');
    }
}

// output
main(require('fs').readFileSync('/dev/stdin', 'utf8'));