import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    final Scanner sc = new Scanner(System.in);
	String str = sc.nextLine();
	String[] s = str.split("");
    if(s[2].equals(s[3]) && s[4].equals(s[5])){
      	System.out.println("Yes");
      	return;
    }
    System.out.println("No");
  }
} import java.util.Scanner; Scanner java.util class Main {
  public static void main(String[] args) {
    final Scanner sc = new Scanner(System.in);
	String str = sc.nextLine();
	String[] s = str.split("");
    if(s[2].equals(s[3]) && s[4].equals(s[5])){
      	System.out.println("Yes");
      	return;
    }
    System.out.println("No");
  }
} Main public static void main(String[] args) {
    final Scanner sc = new Scanner(System.in);
	String str = sc.nextLine();
	String[] s = str.split("");
    if(s[2].equals(s[3]) && s[4].equals(s[5])){
      	System.out.println("Yes");
      	return;
    }
    System.out.println("No");
  } main {
    final Scanner sc = new Scanner(System.in);
	String str = sc.nextLine();
	String[] s = str.split("");
    if(s[2].equals(s[3]) && s[4].equals(s[5])){
      	System.out.println("Yes");
      	return;
    }
    System.out.println("No");
  } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc String[] s = str.split(""); s str.split("") str.split str "" if(s[2].equals(s[3]) && s[4].equals(s[5])){
      	System.out.println("Yes");
      	return;
    } s[2].equals(s[3]) && s[4].equals(s[5]) s[2].equals(s[3]) s[2].equals s[2] s 2 s[3] s 3 s[4].equals(s[5]) s[4].equals s[4] s 4 s[5] s 5 {
      	System.out.println("Yes");
      	return;
    } System.out.println("Yes") System.out.println System.out System System.out "Yes" return; System.out.println("No") System.out.println System.out System System.out "No" String[] args args
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    final Scanner sc = new Scanner(System.in);
	String str = sc.nextLine();
	String[] s = str.split("");
    if(s[2].equals(s[3]) && s[4].equals(s[5])){
      	System.out.println("Yes");
      	return;
    }
    System.out.println("No");
  }
}