import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    if ( S.substring(2,3).equals(S.substring(3,4)) ){
      if (S.substring(4,5).equals(S.substring(5,6)) )
      { System.out.println("Yes");
      }
      else
        System.out.println("No");
    }
    else
      System.out.println("No");
  }
} import java.util.*; util.* java class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    if ( S.substring(2,3).equals(S.substring(3,4)) ){
      if (S.substring(4,5).equals(S.substring(5,6)) )
      { System.out.println("Yes");
      }
      else
        System.out.println("No");
    }
    else
      System.out.println("No");
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    if ( S.substring(2,3).equals(S.substring(3,4)) ){
      if (S.substring(4,5).equals(S.substring(5,6)) )
      { System.out.println("Yes");
      }
      else
        System.out.println("No");
    }
    else
      System.out.println("No");
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    if ( S.substring(2,3).equals(S.substring(3,4)) ){
      if (S.substring(4,5).equals(S.substring(5,6)) )
      { System.out.println("Yes");
      }
      else
        System.out.println("No");
    }
    else
      System.out.println("No");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc if ( S.substring(2,3).equals(S.substring(3,4)) ){
      if (S.substring(4,5).equals(S.substring(5,6)) )
      { System.out.println("Yes");
      }
      else
        System.out.println("No");
    }
    else
      System.out.println("No"); S.substring(2,3).equals(S.substring(3,4)) S.substring(2,3).equals S.substring(2,3) S.substring S 2 3 S.substring(3,4) S.substring S 3 4 {
      if (S.substring(4,5).equals(S.substring(5,6)) )
      { System.out.println("Yes");
      }
      else
        System.out.println("No");
    } if (S.substring(4,5).equals(S.substring(5,6)) )
      { System.out.println("Yes");
      }
      else
        System.out.println("No"); S.substring(4,5).equals(S.substring(5,6)) S.substring(4,5).equals S.substring(4,5) S.substring S 4 5 S.substring(5,6) S.substring S 5 6 { System.out.println("Yes");
      } System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" System.out.println("No") System.out.println System.out System System.out "No" String[] args args
import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    if ( S.substring(2,3).equals(S.substring(3,4)) ){
      if (S.substring(4,5).equals(S.substring(5,6)) )
      { System.out.println("Yes");
      }
      else
        System.out.println("No");
    }
    else
      System.out.println("No");
  }
}