function Main(input) {
    input = input.split("\n");
  	var a = input[0].split("");
  	var answer="";
    if(a[2]==a[3]&&a[4]==a[5]){
		answer="Yes";
    }else{
		answer="No";
    }
  	console.log(answer);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));