import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		String[] input_str = str.split("");
		if ( (input_str[2].equals(input_str[3])) && (input_str[4].equals(input_str[5]))){
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		String[] input_str = str.split("");
		if ( (input_str[2].equals(input_str[3])) && (input_str[4].equals(input_str[5]))){
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		String[] input_str = str.split("");
		if ( (input_str[2].equals(input_str[3])) && (input_str[4].equals(input_str[5]))){
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} main {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		String[] input_str = str.split("");
		if ( (input_str[2].equals(input_str[3])) && (input_str[4].equals(input_str[5]))){
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan String[] input_str = str.split(""); input_str str.split("") str.split str "" if ( (input_str[2].equals(input_str[3])) && (input_str[4].equals(input_str[5]))){
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} (input_str[2].equals(input_str[3])) && (input_str[4].equals(input_str[5])) (input_str[2].equals(input_str[3])) input_str[2].equals input_str[2] input_str 2 input_str[3] input_str 3 (input_str[4].equals(input_str[5])) input_str[4].equals input_str[4] input_str 4 input_str[5] input_str 5 {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		String[] input_str = str.split("");
		if ( (input_str[2].equals(input_str[3])) && (input_str[4].equals(input_str[5]))){
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		String[] input_str = str.split("");
		if ( (input_str[2].equals(input_str[3])) && (input_str[4].equals(input_str[5]))){
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		String[] input_str = str.split("");
		if ( (input_str[2].equals(input_str[3])) && (input_str[4].equals(input_str[5]))){
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

}
