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