import java.util.Scanner;

public class Main{

	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		String result = "No";
		if(String.valueOf(S.charAt(2)).equals(String.valueOf(S.charAt(3)))
				&&(String.valueOf(S.charAt(4)).equals(String.valueOf(S.charAt(5))))){
			result = "Yes";
		}
		System.out.println(result);
	}
} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		String result = "No";
		if(String.valueOf(S.charAt(2)).equals(String.valueOf(S.charAt(3)))
				&&(String.valueOf(S.charAt(4)).equals(String.valueOf(S.charAt(5))))){
			result = "Yes";
		}
		System.out.println(result);
	}
} Main public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		String result = "No";
		if(String.valueOf(S.charAt(2)).equals(String.valueOf(S.charAt(3)))
				&&(String.valueOf(S.charAt(4)).equals(String.valueOf(S.charAt(5))))){
			result = "Yes";
		}
		System.out.println(result);
	} main {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		String result = "No";
		if(String.valueOf(S.charAt(2)).equals(String.valueOf(S.charAt(3)))
				&&(String.valueOf(S.charAt(4)).equals(String.valueOf(S.charAt(5))))){
			result = "Yes";
		}
		System.out.println(result);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan String result = "No"; result "No" if(String.valueOf(S.charAt(2)).equals(String.valueOf(S.charAt(3)))
				&&(String.valueOf(S.charAt(4)).equals(String.valueOf(S.charAt(5))))){
			result = "Yes";
		} String.valueOf(S.charAt(2)).equals(String.valueOf(S.charAt(3)))
				&&(String.valueOf(S.charAt(4)).equals(String.valueOf(S.charAt(5)))) String.valueOf(S.charAt(2)).equals(String.valueOf(S.charAt(3))) String.valueOf(S.charAt(2)).equals String.valueOf(S.charAt(2)) String.valueOf String S.charAt(2) S.charAt S 2 String.valueOf(S.charAt(3)) String.valueOf String S.charAt(3) S.charAt S 3 (String.valueOf(S.charAt(4)).equals(String.valueOf(S.charAt(5)))) String.valueOf(S.charAt(4)).equals String.valueOf(S.charAt(4)) String.valueOf String S.charAt(4) S.charAt S 4 String.valueOf(S.charAt(5)) String.valueOf String S.charAt(5) S.charAt S 5 {
			result = "Yes";
		} result = "Yes" result "Yes" 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 scan = new Scanner(System.in);
		String S = scan.next();
		String result = "No";
		if(String.valueOf(S.charAt(2)).equals(String.valueOf(S.charAt(3)))
				&&(String.valueOf(S.charAt(4)).equals(String.valueOf(S.charAt(5))))){
			result = "Yes";
		}
		System.out.println(result);
	}
} public class Main{

	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		String result = "No";
		if(String.valueOf(S.charAt(2)).equals(String.valueOf(S.charAt(3)))
				&&(String.valueOf(S.charAt(4)).equals(String.valueOf(S.charAt(5))))){
			result = "Yes";
		}
		System.out.println(result);
	}
} Main
import java.util.Scanner;

public class Main{

	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		String result = "No";
		if(String.valueOf(S.charAt(2)).equals(String.valueOf(S.charAt(3)))
				&&(String.valueOf(S.charAt(4)).equals(String.valueOf(S.charAt(5))))){
			result = "Yes";
		}
		System.out.println(result);
	}
}