import java.util.Scanner;
class Main{
public static void main(String[]args){

Scanner sc=new Scanner(System.in);
  String moji=sc.nextLine();
  
  char[] S=new char[6];
  for(int i=0; i<6; i++){
  S[i]=moji.charAt(i);
  }
  if(S[2]==S[3] && S[4]==S[5]){
    System.out.println("Yes");
  }else{
    System.out.println("No");
  }
}
} import java.util.Scanner; Scanner java.util class Main{
public static void main(String[]args){

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

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

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

Scanner sc=new Scanner(System.in);
  String moji=sc.nextLine();
  
  char[] S=new char[6];
  for(int i=0; i<6; i++){
  S[i]=moji.charAt(i);
  }
  if(S[2]==S[3] && S[4]==S[5]){
    System.out.println("Yes");
  }else{
    System.out.println("No");
  }
}
}