import java.util.Scanner;
public class Main {
	 public static void main(String args[]){
	Scanner scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();

	 String str3 = String.valueOf(a.charAt(2));
	    String str4 = String.valueOf(a.charAt(3));
	    String str5 = String.valueOf(a.charAt(4));
	    String str6 = String.valueOf(a.charAt(5));
	    if(str3.equals(str4) && str5.equals(str6)){
	    		System.out.println("Yes");
	    }
	    else {
	    	System.out.println("No");
	    }

	}
} import java.util.Scanner; Scanner java.util public class Main {
	 public static void main(String args[]){
	Scanner scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();

	 String str3 = String.valueOf(a.charAt(2));
	    String str4 = String.valueOf(a.charAt(3));
	    String str5 = String.valueOf(a.charAt(4));
	    String str6 = String.valueOf(a.charAt(5));
	    if(str3.equals(str4) && str5.equals(str6)){
	    		System.out.println("Yes");
	    }
	    else {
	    	System.out.println("No");
	    }

	}
} Main public static void main(String args[]){
	Scanner scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();

	 String str3 = String.valueOf(a.charAt(2));
	    String str4 = String.valueOf(a.charAt(3));
	    String str5 = String.valueOf(a.charAt(4));
	    String str6 = String.valueOf(a.charAt(5));
	    if(str3.equals(str4) && str5.equals(str6)){
	    		System.out.println("Yes");
	    }
	    else {
	    	System.out.println("No");
	    }

	} main {
	Scanner scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();

	 String str3 = String.valueOf(a.charAt(2));
	    String str4 = String.valueOf(a.charAt(3));
	    String str5 = String.valueOf(a.charAt(4));
	    String str6 = String.valueOf(a.charAt(5));
	    if(str3.equals(str4) && str5.equals(str6)){
	    		System.out.println("Yes");
	    }
	    else {
	    	System.out.println("No");
	    }

	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String a=scanner.next(); a scanner.next() scanner.next scanner String str3 = String.valueOf(a.charAt(2)); str3 String.valueOf(a.charAt(2)) String.valueOf String a.charAt(2) a.charAt a 2 String str4 = String.valueOf(a.charAt(3)); str4 String.valueOf(a.charAt(3)) String.valueOf String a.charAt(3) a.charAt a 3 String str5 = String.valueOf(a.charAt(4)); str5 String.valueOf(a.charAt(4)) String.valueOf String a.charAt(4) a.charAt a 4 String str6 = String.valueOf(a.charAt(5)); str6 String.valueOf(a.charAt(5)) String.valueOf String a.charAt(5) a.charAt a 5 if(str3.equals(str4) && str5.equals(str6)){
	    		System.out.println("Yes");
	    }
	    else {
	    	System.out.println("No");
	    } str3.equals(str4) && str5.equals(str6) str3.equals(str4) str3.equals str3 str4 str5.equals(str6) str5.equals str5 str6 {
	    		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 scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();

	 String str3 = String.valueOf(a.charAt(2));
	    String str4 = String.valueOf(a.charAt(3));
	    String str5 = String.valueOf(a.charAt(4));
	    String str6 = String.valueOf(a.charAt(5));
	    if(str3.equals(str4) && str5.equals(str6)){
	    		System.out.println("Yes");
	    }
	    else {
	    	System.out.println("No");
	    }

	}
} public class Main {
	 public static void main(String args[]){
	Scanner scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();

	 String str3 = String.valueOf(a.charAt(2));
	    String str4 = String.valueOf(a.charAt(3));
	    String str5 = String.valueOf(a.charAt(4));
	    String str6 = String.valueOf(a.charAt(5));
	    if(str3.equals(str4) && str5.equals(str6)){
	    		System.out.println("Yes");
	    }
	    else {
	    	System.out.println("No");
	    }

	}
} Main
import java.util.Scanner;
public class Main {
	 public static void main(String args[]){
	Scanner scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();

	 String str3 = String.valueOf(a.charAt(2));
	    String str4 = String.valueOf(a.charAt(3));
	    String str5 = String.valueOf(a.charAt(4));
	    String str6 = String.valueOf(a.charAt(5));
	    if(str3.equals(str4) && str5.equals(str6)){
	    		System.out.println("Yes");
	    }
	    else {
	    	System.out.println("No");
	    }

	}
}