import java.util.Scanner;
import java.util.Arrays;
import java.util.List;

public class Main {
	public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String result = "";
		if (input.substring(2,3).equals(input.substring(3,4)) && input.substring(4,5).equals(input.substring(5,6))) {
			result = "Yes";
		} else {
			result = "No";
		}
	    System.out.println(result);
	}
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util public class Main {
	public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String result = "";
		if (input.substring(2,3).equals(input.substring(3,4)) && input.substring(4,5).equals(input.substring(5,6))) {
			result = "Yes";
		} else {
			result = "No";
		}
	    System.out.println(result);
	}
} Main public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String result = "";
		if (input.substring(2,3).equals(input.substring(3,4)) && input.substring(4,5).equals(input.substring(5,6))) {
			result = "Yes";
		} else {
			result = "No";
		}
	    System.out.println(result);
	} main {
	    Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String result = "";
		if (input.substring(2,3).equals(input.substring(3,4)) && input.substring(4,5).equals(input.substring(5,6))) {
			result = "Yes";
		} else {
			result = "No";
		}
	    System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.nextLine(); input sc.nextLine() sc.nextLine sc String result = ""; result "" if (input.substring(2,3).equals(input.substring(3,4)) && input.substring(4,5).equals(input.substring(5,6))) {
			result = "Yes";
		} else {
			result = "No";
		} input.substring(2,3).equals(input.substring(3,4)) && input.substring(4,5).equals(input.substring(5,6)) input.substring(2,3).equals(input.substring(3,4)) input.substring(2,3).equals input.substring(2,3) input.substring input 2 3 input.substring(3,4) input.substring input 3 4 input.substring(4,5).equals(input.substring(5,6)) input.substring(4,5).equals input.substring(4,5) input.substring input 4 5 input.substring(5,6) input.substring input 5 6 {
			result = "Yes";
		} result = "Yes" result "Yes" {
			result = "No";
		} result = "No" result "No" System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
	public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String result = "";
		if (input.substring(2,3).equals(input.substring(3,4)) && input.substring(4,5).equals(input.substring(5,6))) {
			result = "Yes";
		} else {
			result = "No";
		}
	    System.out.println(result);
	}
} public class Main {
	public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String result = "";
		if (input.substring(2,3).equals(input.substring(3,4)) && input.substring(4,5).equals(input.substring(5,6))) {
			result = "Yes";
		} else {
			result = "No";
		}
	    System.out.println(result);
	}
} Main
import java.util.Scanner;
import java.util.Arrays;
import java.util.List;

public class Main {
	public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String result = "";
		if (input.substring(2,3).equals(input.substring(3,4)) && input.substring(4,5).equals(input.substring(5,6))) {
			result = "Yes";
		} else {
			result = "No";
		}
	    System.out.println(result);
	}
}
