import java.util.*;
public class Main {
    public static void main(String[] args){
      // 入力
      Scanner sc = new Scanner(System.in);
      String S = sc.next();
      
      // 判定
      char c3 = S.charAt(2);
      char c4 = S.charAt(3);
      char c5 = S.charAt(4);
      char c6 = S.charAt(5);
      
      String result = "No";
      if(c3 == c4 && c5 == c6){
        result = "Yes";
      }
      
      // 出力
      System.out.println(result);
    }
    
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
      // 入力
      Scanner sc = new Scanner(System.in);
      String S = sc.next();
      
      // 判定
      char c3 = S.charAt(2);
      char c4 = S.charAt(3);
      char c5 = S.charAt(4);
      char c6 = S.charAt(5);
      
      String result = "No";
      if(c3 == c4 && c5 == c6){
        result = "Yes";
      }
      
      // 出力
      System.out.println(result);
    }
    
} Main public static void main(String[] args){
      // 入力
      Scanner sc = new Scanner(System.in);
      String S = sc.next();
      
      // 判定
      char c3 = S.charAt(2);
      char c4 = S.charAt(3);
      char c5 = S.charAt(4);
      char c6 = S.charAt(5);
      
      String result = "No";
      if(c3 == c4 && c5 == c6){
        result = "Yes";
      }
      
      // 出力
      System.out.println(result);
    } main {
      // 入力
      Scanner sc = new Scanner(System.in);
      String S = sc.next();
      
      // 判定
      char c3 = S.charAt(2);
      char c4 = S.charAt(3);
      char c5 = S.charAt(4);
      char c6 = S.charAt(5);
      
      String result = "No";
      if(c3 == c4 && c5 == c6){
        result = "Yes";
      }
      
      // 出力
      System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc char c3 = S.charAt(2); c3 S.charAt(2) S.charAt S 2 char c4 = S.charAt(3); c4 S.charAt(3) S.charAt S 3 char c5 = S.charAt(4); c5 S.charAt(4) S.charAt S 4 char c6 = S.charAt(5); c6 S.charAt(5) S.charAt S 5 String result = "No"; result "No" if(c3 == c4 && c5 == c6){
        result = "Yes";
      } c3 == c4 && c5 == c6 c3 == c4 c3 c4 c5 == c6 c5 c6 {
        result = "Yes";
      } result = "Yes" result "Yes" System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args){
      // 入力
      Scanner sc = new Scanner(System.in);
      String S = sc.next();
      
      // 判定
      char c3 = S.charAt(2);
      char c4 = S.charAt(3);
      char c5 = S.charAt(4);
      char c6 = S.charAt(5);
      
      String result = "No";
      if(c3 == c4 && c5 == c6){
        result = "Yes";
      }
      
      // 出力
      System.out.println(result);
    }
    
} public class Main {
    public static void main(String[] args){
      // 入力
      Scanner sc = new Scanner(System.in);
      String S = sc.next();
      
      // 判定
      char c3 = S.charAt(2);
      char c4 = S.charAt(3);
      char c5 = S.charAt(4);
      char c6 = S.charAt(5);
      
      String result = "No";
      if(c3 == c4 && c5 == c6){
        result = "Yes";
      }
      
      // 出力
      System.out.println(result);
    }
    
} Main
import java.util.*;
public class Main {
    public static void main(String[] args){
      // 入力
      Scanner sc = new Scanner(System.in);
      String S = sc.next();
      
      // 判定
      char c3 = S.charAt(2);
      char c4 = S.charAt(3);
      char c5 = S.charAt(4);
      char c6 = S.charAt(5);
      
      String result = "No";
      if(c3 == c4 && c5 == c6){
        result = "Yes";
      }
      
      // 出力
      System.out.println(result);
    }
    
}