import java.util.Scanner;
public class Main{
	public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      String list[] = sc.next().split("");
      if(list[2].equals(list[3]) && list[4].equals(list[5])){
        System.out.print("Yes");
      }else{
        System.out.print("No");
      }
    }
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      String list[] = sc.next().split("");
      if(list[2].equals(list[3]) && list[4].equals(list[5])){
        System.out.print("Yes");
      }else{
        System.out.print("No");
      }
    }
} Main public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      String list[] = sc.next().split("");
      if(list[2].equals(list[3]) && list[4].equals(list[5])){
        System.out.print("Yes");
      }else{
        System.out.print("No");
      }
    } main {
      Scanner sc = new Scanner(System.in);
      String list[] = sc.next().split("");
      if(list[2].equals(list[3]) && list[4].equals(list[5])){
        System.out.print("Yes");
      }else{
        System.out.print("No");
      }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String list[] = sc.next().split(""); list sc.next().split("") sc.next().split sc.next() sc.next sc "" if(list[2].equals(list[3]) && list[4].equals(list[5])){
        System.out.print("Yes");
      }else{
        System.out.print("No");
      } list[2].equals(list[3]) && list[4].equals(list[5]) list[2].equals(list[3]) list[2].equals list[2] list 2 list[3] list 3 list[4].equals(list[5]) list[4].equals list[4] list 4 list[5] list 5 {
        System.out.print("Yes");
      } System.out.print("Yes") System.out.print System.out System System.out "Yes" {
        System.out.print("No");
      } System.out.print("No") System.out.print System.out System System.out "No" String args[] args public class Main{
	public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      String list[] = sc.next().split("");
      if(list[2].equals(list[3]) && list[4].equals(list[5])){
        System.out.print("Yes");
      }else{
        System.out.print("No");
      }
    }
} public class Main{
	public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      String list[] = sc.next().split("");
      if(list[2].equals(list[3]) && list[4].equals(list[5])){
        System.out.print("Yes");
      }else{
        System.out.print("No");
      }
    }
} Main
import java.util.Scanner;
public class Main{
	public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      String list[] = sc.next().split("");
      if(list[2].equals(list[3]) && list[4].equals(list[5])){
        System.out.print("Yes");
      }else{
        System.out.print("No");
      }
    }
}