import java.io.*;

class Main{
 
  public static void main(String args[])throws IOException{
  	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    
    if(str.length() != 6)
      System.out.println("No");
    else{
      if((str.charAt(2) == str.charAt(3)) && (str.charAt(4) == str.charAt(5))){
      	System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    }
  }
} import java.io.*; io.* java class Main{
 
  public static void main(String args[])throws IOException{
  	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    
    if(str.length() != 6)
      System.out.println("No");
    else{
      if((str.charAt(2) == str.charAt(3)) && (str.charAt(4) == str.charAt(5))){
      	System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    }
  }
} Main public static void main(String args[])throws IOException{
  	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    
    if(str.length() != 6)
      System.out.println("No");
    else{
      if((str.charAt(2) == str.charAt(3)) && (str.charAt(4) == str.charAt(5))){
      	System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    }
  } main {
  	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    
    if(str.length() != 6)
      System.out.println("No");
    else{
      if((str.charAt(2) == str.charAt(3)) && (str.charAt(4) == str.charAt(5))){
      	System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    }
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br if(str.length() != 6)
      System.out.println("No");
    else{
      if((str.charAt(2) == str.charAt(3)) && (str.charAt(4) == str.charAt(5))){
      	System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    } str.length() != 6 str.length() str.length str 6 System.out.println("No") System.out.println System.out System System.out "No" {
      if((str.charAt(2) == str.charAt(3)) && (str.charAt(4) == str.charAt(5))){
      	System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    } if((str.charAt(2) == str.charAt(3)) && (str.charAt(4) == str.charAt(5))){
      	System.out.println("Yes");
      }
      else{
        System.out.println("No");
      } (str.charAt(2) == str.charAt(3)) && (str.charAt(4) == str.charAt(5)) (str.charAt(2) == str.charAt(3)) str.charAt(2) str.charAt str 2 str.charAt(3) str.charAt str 3 (str.charAt(4) == str.charAt(5)) str.charAt(4) str.charAt str 4 str.charAt(5) str.charAt str 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.io.*;

class Main{
 
  public static void main(String args[])throws IOException{
  	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    
    if(str.length() != 6)
      System.out.println("No");
    else{
      if((str.charAt(2) == str.charAt(3)) && (str.charAt(4) == str.charAt(5))){
      	System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    }
  }
}