import java.util.Scanner;

 
public class Main {
 
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();

		Boolean ans = false;
		if(S.substring(2, 3).equals(S.substring(3, 4)) && S.substring(4, 5).equals(S.substring(5, 6))) {
			ans = true;
		}
		
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		sc.close();
		
	}
	
} 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();

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

		Boolean ans = false;
		if(S.substring(2, 3).equals(S.substring(3, 4)) && S.substring(4, 5).equals(S.substring(5, 6))) {
			ans = true;
		}
		
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		sc.close();
		
	} main {
		
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();

		Boolean ans = false;
		if(S.substring(2, 3).equals(S.substring(3, 4)) && S.substring(4, 5).equals(S.substring(5, 6))) {
			ans = true;
		}
		
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		sc.close();
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc Boolean ans = false; ans false if(S.substring(2, 3).equals(S.substring(3, 4)) && S.substring(4, 5).equals(S.substring(5, 6))) {
			ans = true;
		} S.substring(2, 3).equals(S.substring(3, 4)) && S.substring(4, 5).equals(S.substring(5, 6)) S.substring(2, 3).equals(S.substring(3, 4)) S.substring(2, 3).equals S.substring(2, 3) S.substring S 2 3 S.substring(3, 4) S.substring S 3 4 S.substring(4, 5).equals(S.substring(5, 6)) S.substring(4, 5).equals S.substring(4, 5) S.substring S 4 5 S.substring(5, 6) S.substring S 5 6 {
			ans = true;
		} ans = true ans true if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} ans {
			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" sc.close() sc.close sc String[] args args public class Main {
 
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();

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

		Boolean ans = false;
		if(S.substring(2, 3).equals(S.substring(3, 4)) && S.substring(4, 5).equals(S.substring(5, 6))) {
			ans = true;
		}
		
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		sc.close();
		
	}
	
} Main
import java.util.Scanner;

 
public class Main {
 
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();

		Boolean ans = false;
		if(S.substring(2, 3).equals(S.substring(3, 4)) && S.substring(4, 5).equals(S.substring(5, 6))) {
			ans = true;
		}
		
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		sc.close();
		
	}
	
}