function Main(input) {
	if(input.charAt(2) == input.charAt(3) && input.charAt(4) == input.charAt(5)){
		console.log("Yes");
	}else{
		console.log("No");
	}
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));