import java.util.Arrays;
import java.util.Scanner;
 
public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	public static void main(String[] args) {
	String S =sc.next();
	if(S.charAt(2)==S.charAt(3)&&S.charAt(4)==S.charAt(5)) {
		p("Yes");
	}else {
		p("No");
	}
	
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	public static void main(String[] args) {
	String S =sc.next();
	if(S.charAt(2)==S.charAt(3)&&S.charAt(4)==S.charAt(5)) {
		p("Yes");
	}else {
		p("No");
	}
	
	}
} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}; eikomoji {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"} "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z" static void p(String ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans String ans ans static void p(int ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans int ans ans static void p(long ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans long ans ans public static void main(String[] args) {
	String S =sc.next();
	if(S.charAt(2)==S.charAt(3)&&S.charAt(4)==S.charAt(5)) {
		p("Yes");
	}else {
		p("No");
	}
	
	} main {
	String S =sc.next();
	if(S.charAt(2)==S.charAt(3)&&S.charAt(4)==S.charAt(5)) {
		p("Yes");
	}else {
		p("No");
	}
	
	} String S =sc.next(); S sc.next() sc.next sc if(S.charAt(2)==S.charAt(3)&&S.charAt(4)==S.charAt(5)) {
		p("Yes");
	}else {
		p("No");
	} S.charAt(2)==S.charAt(3)&&S.charAt(4)==S.charAt(5) S.charAt(2)==S.charAt(3) S.charAt(2) S.charAt S 2 S.charAt(3) S.charAt S 3 S.charAt(4)==S.charAt(5) S.charAt(4) S.charAt S 4 S.charAt(5) S.charAt S 5 {
		p("Yes");
	} p("Yes") p "Yes" {
		p("No");
	} p("No") p "No" String[] args args public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	public static void main(String[] args) {
	String S =sc.next();
	if(S.charAt(2)==S.charAt(3)&&S.charAt(4)==S.charAt(5)) {
		p("Yes");
	}else {
		p("No");
	}
	
	}
} public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	public static void main(String[] args) {
	String S =sc.next();
	if(S.charAt(2)==S.charAt(3)&&S.charAt(4)==S.charAt(5)) {
		p("Yes");
	}else {
		p("No");
	}
	
	}
} Main
import java.util.Arrays;
import java.util.Scanner;
 
public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static String eikomoji[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
	public static void main(String[] args) {
	String S =sc.next();
	if(S.charAt(2)==S.charAt(3)&&S.charAt(4)==S.charAt(5)) {
		p("Yes");
	}else {
		p("No");
	}
	
	}
}