function getLines(input){
	return input.split("\n").map((s)=>s.trim())
}
function parseLine(line){
	return line.split(" ").map((s)=>s.trim());
}
function parseLineToInt(line){
	return line.split(" ").map((s)=>parseInt(s.trim()));
}
// parameter "input" gets all data
function Main(input) {
	// the first line is assigned to input[0], the second line is assigned to input[1] similarly.	
	input = parseLine(input)[0];
	console.log((input[2]==input[3] && input[4]==input[5])?'Yes':'No');
}
// Don't edit this line!
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
