import java.util.*;

public class Main{
  public static void main(String[] args){
    
    String S = new Scanner(System.in).nextLine();
    
    String[]  S_Array = new String[S.length()];
    
    for(int i=0; i<S.length(); i++){
        S_Array[i] = String.valueOf(S.charAt(i));
    }

    
    if(S_Array[2].equals(S_Array[3]) && S_Array[4].equals(S_Array[5])){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}

    
     import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    
    String S = new Scanner(System.in).nextLine();
    
    String[]  S_Array = new String[S.length()];
    
    for(int i=0; i<S.length(); i++){
        S_Array[i] = String.valueOf(S.charAt(i));
    }

    
    if(S_Array[2].equals(S_Array[3]) && S_Array[4].equals(S_Array[5])){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
} Main public static void main(String[] args){
    
    String S = new Scanner(System.in).nextLine();
    
    String[]  S_Array = new String[S.length()];
    
    for(int i=0; i<S.length(); i++){
        S_Array[i] = String.valueOf(S.charAt(i));
    }

    
    if(S_Array[2].equals(S_Array[3]) && S_Array[4].equals(S_Array[5])){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  } main {
    
    String S = new Scanner(System.in).nextLine();
    
    String[]  S_Array = new String[S.length()];
    
    for(int i=0; i<S.length(); i++){
        S_Array[i] = String.valueOf(S.charAt(i));
    }

    
    if(S_Array[2].equals(S_Array[3]) && S_Array[4].equals(S_Array[5])){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  } String S = new Scanner(System.in).nextLine(); S new Scanner(System.in).nextLine() new Scanner(System.in).nextLine new Scanner(System.in) String[]  S_Array = new String[S.length()]; S_Array new String[S.length()] S.length() S.length S for(int i=0; i<S.length(); i++){
        S_Array[i] = String.valueOf(S.charAt(i));
    } int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
        S_Array[i] = String.valueOf(S.charAt(i));
    } {
        S_Array[i] = String.valueOf(S.charAt(i));
    } S_Array[i] = String.valueOf(S.charAt(i)) S_Array[i] S_Array i String.valueOf(S.charAt(i)) String.valueOf String S.charAt(i) S.charAt S i if(S_Array[2].equals(S_Array[3]) && S_Array[4].equals(S_Array[5])){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    } S_Array[2].equals(S_Array[3]) && S_Array[4].equals(S_Array[5]) S_Array[2].equals(S_Array[3]) S_Array[2].equals S_Array[2] S_Array 2 S_Array[3] S_Array 3 S_Array[4].equals(S_Array[5]) S_Array[4].equals S_Array[4] S_Array 4 S_Array[5] S_Array 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){
    
    String S = new Scanner(System.in).nextLine();
    
    String[]  S_Array = new String[S.length()];
    
    for(int i=0; i<S.length(); i++){
        S_Array[i] = String.valueOf(S.charAt(i));
    }

    
    if(S_Array[2].equals(S_Array[3]) && S_Array[4].equals(S_Array[5])){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
} public class Main{
  public static void main(String[] args){
    
    String S = new Scanner(System.in).nextLine();
    
    String[]  S_Array = new String[S.length()];
    
    for(int i=0; i<S.length(); i++){
        S_Array[i] = String.valueOf(S.charAt(i));
    }

    
    if(S_Array[2].equals(S_Array[3]) && S_Array[4].equals(S_Array[5])){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    
    String S = new Scanner(System.in).nextLine();
    
    String[]  S_Array = new String[S.length()];
    
    for(int i=0; i<S.length(); i++){
        S_Array[i] = String.valueOf(S.charAt(i));
    }

    
    if(S_Array[2].equals(S_Array[3]) && S_Array[4].equals(S_Array[5])){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}

    
    