import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		char[] array = s.toCharArray();
		
		for(int i=0;i<array.length;i++){
			if(array[2]==array[3]&&array[4]==array[5]){
				System.out.print("Yes");
				break;
			}
			else {
				System.out.print("No");
				break;
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		char[] array = s.toCharArray();
		
		for(int i=0;i<array.length;i++){
			if(array[2]==array[3]&&array[4]==array[5]){
				System.out.print("Yes");
				break;
			}
			else {
				System.out.print("No");
				break;
			}
		}
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		char[] array = s.toCharArray();
		
		for(int i=0;i<array.length;i++){
			if(array[2]==array[3]&&array[4]==array[5]){
				System.out.print("Yes");
				break;
			}
			else {
				System.out.print("No");
				break;
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		char[] array = s.toCharArray();
		
		for(int i=0;i<array.length;i++){
			if(array[2]==array[3]&&array[4]==array[5]){
				System.out.print("Yes");
				break;
			}
			else {
				System.out.print("No");
				break;
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc char[] array = s.toCharArray(); array s.toCharArray() s.toCharArray s for(int i=0;i<array.length;i++){
			if(array[2]==array[3]&&array[4]==array[5]){
				System.out.print("Yes");
				break;
			}
			else {
				System.out.print("No");
				break;
			}
		} int i=0; int i=0; i 0 i<array.length i array.length array array.length i++ i++ i {
			if(array[2]==array[3]&&array[4]==array[5]){
				System.out.print("Yes");
				break;
			}
			else {
				System.out.print("No");
				break;
			}
		} {
			if(array[2]==array[3]&&array[4]==array[5]){
				System.out.print("Yes");
				break;
			}
			else {
				System.out.print("No");
				break;
			}
		} if(array[2]==array[3]&&array[4]==array[5]){
				System.out.print("Yes");
				break;
			}
			else {
				System.out.print("No");
				break;
			} array[2]==array[3]&&array[4]==array[5] array[2]==array[3] array[2] array 2 array[3] array 3 array[4]==array[5] array[4] array 4 array[5] array 5 {
				System.out.print("Yes");
				break;
			} System.out.print("Yes") System.out.print System.out System System.out "Yes" break; {
				System.out.print("No");
				break;
			} System.out.print("No") System.out.print System.out System System.out "No" break; String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		char[] array = s.toCharArray();
		
		for(int i=0;i<array.length;i++){
			if(array[2]==array[3]&&array[4]==array[5]){
				System.out.print("Yes");
				break;
			}
			else {
				System.out.print("No");
				break;
			}
		}
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		char[] array = s.toCharArray();
		
		for(int i=0;i<array.length;i++){
			if(array[2]==array[3]&&array[4]==array[5]){
				System.out.print("Yes");
				break;
			}
			else {
				System.out.print("No");
				break;
			}
		}
	}
} Main
import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		char[] array = s.toCharArray();
		
		for(int i=0;i<array.length;i++){
			if(array[2]==array[3]&&array[4]==array[5]){
				System.out.print("Yes");
				break;
			}
			else {
				System.out.print("No");
				break;
			}
		}
	}
}