import java.util.Scanner;

public class Main {
  @SuppressWarnings("resource")
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    char[] arr = sc.next().toCharArray();

    System.out.println(arr[2] == arr[3] && arr[4] == arr[5] ? "Yes": "No");
  }
} import java.util.Scanner; Scanner java.util public class Main {
  @SuppressWarnings("resource")
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    char[] arr = sc.next().toCharArray();

    System.out.println(arr[2] == arr[3] && arr[4] == arr[5] ? "Yes": "No");
  }
} Main @SuppressWarnings("resource")
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    char[] arr = sc.next().toCharArray();

    System.out.println(arr[2] == arr[3] && arr[4] == arr[5] ? "Yes": "No");
  } main {
    Scanner sc = new Scanner(System.in);
    char[] arr = sc.next().toCharArray();

    System.out.println(arr[2] == arr[3] && arr[4] == arr[5] ? "Yes": "No");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] arr = sc.next().toCharArray(); arr sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc System.out.println(arr[2] == arr[3] && arr[4] == arr[5] ? "Yes": "No") System.out.println System.out System System.out arr[2] == arr[3] && arr[4] == arr[5] ? "Yes": "No" arr[2] == arr[3] && arr[4] == arr[5] arr[2] == arr[3] arr[2] arr 2 arr[3] arr 3 arr[4] == arr[5] arr[4] arr 4 arr[5] arr 5 "Yes" "No" String[] args args public class Main {
  @SuppressWarnings("resource")
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    char[] arr = sc.next().toCharArray();

    System.out.println(arr[2] == arr[3] && arr[4] == arr[5] ? "Yes": "No");
  }
} public class Main {
  @SuppressWarnings("resource")
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    char[] arr = sc.next().toCharArray();

    System.out.println(arr[2] == arr[3] && arr[4] == arr[5] ? "Yes": "No");
  }
} Main
import java.util.Scanner;

public class Main {
  @SuppressWarnings("resource")
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    char[] arr = sc.next().toCharArray();

    System.out.println(arr[2] == arr[3] && arr[4] == arr[5] ? "Yes": "No");
  }
}