import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String data = sc.nextLine();
      
      	char[] letter = new char [data.length()];
      
      	for (int i = 0; i < data.length(); i++ ) {
          letter[i] = data.charAt(i);
        }
    
    if (letter[2] == letter[3] && letter[4] == letter[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 sc = new Scanner(System.in);
        String data = sc.nextLine();
      
      	char[] letter = new char [data.length()];
      
      	for (int i = 0; i < data.length(); i++ ) {
          letter[i] = data.charAt(i);
        }
    
    if (letter[2] == letter[3] && letter[4] == letter[5] ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
      
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String data = sc.nextLine();
      
      	char[] letter = new char [data.length()];
      
      	for (int i = 0; i < data.length(); i++ ) {
          letter[i] = data.charAt(i);
        }
    
    if (letter[2] == letter[3] && letter[4] == letter[5] ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
      
    } main {
        Scanner sc = new Scanner(System.in);
        String data = sc.nextLine();
      
      	char[] letter = new char [data.length()];
      
      	for (int i = 0; i < data.length(); i++ ) {
          letter[i] = data.charAt(i);
        }
    
    if (letter[2] == letter[3] && letter[4] == letter[5] ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
      
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String data = sc.nextLine(); data sc.nextLine() sc.nextLine sc char[] letter = new char [data.length()]; letter new char [data.length()] data.length() data.length data for (int i = 0; i < data.length(); i++ ) {
          letter[i] = data.charAt(i);
        } int i = 0; int i = 0; i 0 i < data.length() i data.length() data.length data i++ i++ i {
          letter[i] = data.charAt(i);
        } {
          letter[i] = data.charAt(i);
        } letter[i] = data.charAt(i) letter[i] letter i data.charAt(i) data.charAt data i if (letter[2] == letter[3] && letter[4] == letter[5] ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    } letter[2] == letter[3] && letter[4] == letter[5] letter[2] == letter[3] letter[2] letter 2 letter[3] letter 3 letter[4] == letter[5] letter[4] letter 4 letter[5] letter 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 sc = new Scanner(System.in);
        String data = sc.nextLine();
      
      	char[] letter = new char [data.length()];
      
      	for (int i = 0; i < data.length(); i++ ) {
          letter[i] = data.charAt(i);
        }
    
    if (letter[2] == letter[3] && letter[4] == letter[5] ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
      
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String data = sc.nextLine();
      
      	char[] letter = new char [data.length()];
      
      	for (int i = 0; i < data.length(); i++ ) {
          letter[i] = data.charAt(i);
        }
    
    if (letter[2] == letter[3] && letter[4] == letter[5] ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
      
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String data = sc.nextLine();
      
      	char[] letter = new char [data.length()];
      
      	for (int i = 0; i < data.length(); i++ ) {
          letter[i] = data.charAt(i);
        }
    
    if (letter[2] == letter[3] && letter[4] == letter[5] ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
      
    }
}
