import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		scanner.close();
		
		String res = "No";
		if(input.charAt(2) == input.charAt(3) && input.charAt(4) == input.charAt(5)) {
			res = "Yes";
		}
		
		System.out.println(res);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		scanner.close();
		
		String res = "No";
		if(input.charAt(2) == input.charAt(3) && input.charAt(4) == input.charAt(5)) {
			res = "Yes";
		}
		
		System.out.println(res);
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		scanner.close();
		
		String res = "No";
		if(input.charAt(2) == input.charAt(3) && input.charAt(4) == input.charAt(5)) {
			res = "Yes";
		}
		
		System.out.println(res);
	} main {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		scanner.close();
		
		String res = "No";
		if(input.charAt(2) == input.charAt(3) && input.charAt(4) == input.charAt(5)) {
			res = "Yes";
		}
		
		System.out.println(res);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner scanner.close() scanner.close scanner String res = "No"; res "No" if(input.charAt(2) == input.charAt(3) && input.charAt(4) == input.charAt(5)) {
			res = "Yes";
		} input.charAt(2) == input.charAt(3) && input.charAt(4) == input.charAt(5) input.charAt(2) == input.charAt(3) input.charAt(2) input.charAt input 2 input.charAt(3) input.charAt input 3 input.charAt(4) == input.charAt(5) input.charAt(4) input.charAt input 4 input.charAt(5) input.charAt input 5 {
			res = "Yes";
		} res = "Yes" res "Yes" System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		scanner.close();
		
		String res = "No";
		if(input.charAt(2) == input.charAt(3) && input.charAt(4) == input.charAt(5)) {
			res = "Yes";
		}
		
		System.out.println(res);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		scanner.close();
		
		String res = "No";
		if(input.charAt(2) == input.charAt(3) && input.charAt(4) == input.charAt(5)) {
			res = "Yes";
		}
		
		System.out.println(res);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		scanner.close();
		
		String res = "No";
		if(input.charAt(2) == input.charAt(3) && input.charAt(4) == input.charAt(5)) {
			res = "Yes";
		}
		
		System.out.println(res);
	}
}
