import java.util.*;

public class Main{
	public static void main(String[] args) {
		Scanner input =new Scanner(System.in);
		
		String str=input.next();
		char[] a = str.toCharArray();
		
		if((a[2]==a[3])&&(a[4]==a[5])) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	}	
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) {
		Scanner input =new Scanner(System.in);
		
		String str=input.next();
		char[] a = str.toCharArray();
		
		if((a[2]==a[3])&&(a[4]==a[5])) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	}	
} Main public static void main(String[] args) {
		Scanner input =new Scanner(System.in);
		
		String str=input.next();
		char[] a = str.toCharArray();
		
		if((a[2]==a[3])&&(a[4]==a[5])) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	} main {
		Scanner input =new Scanner(System.in);
		
		String str=input.next();
		char[] a = str.toCharArray();
		
		if((a[2]==a[3])&&(a[4]==a[5])) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	} Scanner input =new Scanner(System.in); input new Scanner(System.in) String str=input.next(); str input.next() input.next input char[] a = str.toCharArray(); a str.toCharArray() str.toCharArray str if((a[2]==a[3])&&(a[4]==a[5])) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		} (a[2]==a[3])&&(a[4]==a[5]) (a[2]==a[3]) a[2] a 2 a[3] a 3 (a[4]==a[5]) a[4] a 4 a[5] a 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 input =new Scanner(System.in);
		
		String str=input.next();
		char[] a = str.toCharArray();
		
		if((a[2]==a[3])&&(a[4]==a[5])) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	}	
} public class Main{
	public static void main(String[] args) {
		Scanner input =new Scanner(System.in);
		
		String str=input.next();
		char[] a = str.toCharArray();
		
		if((a[2]==a[3])&&(a[4]==a[5])) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	}	
} Main
import java.util.*;

public class Main{
	public static void main(String[] args) {
		Scanner input =new Scanner(System.in);
		
		String str=input.next();
		char[] a = str.toCharArray();
		
		if((a[2]==a[3])&&(a[4]==a[5])) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	}	
}
