"use strict";

const main = arg => {
  
    const input = arg.trim().split("\n");

    const N = parseInt(input[0]);
    if (N[2] === N[3] && N[4] === N[5]) {
        console.log("Yes");
    } else {
        console.log("No");
    }
  
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));