import java.util.*;

class Main{
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      String str = scan.nextLine();
      String[] coffee = str.split("");
      if(Objects.equals(coffee[2], coffee[3])){
        if(Objects.equals(coffee[4], coffee[5])) 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 scan = new Scanner(System.in);
      String str = scan.nextLine();
      String[] coffee = str.split("");
      if(Objects.equals(coffee[2], coffee[3])){
        if(Objects.equals(coffee[4], coffee[5])) System.out.println("Yes");
        else System.out.println("No");
      } else System.out.println("No");
    }
} Main public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      String str = scan.nextLine();
      String[] coffee = str.split("");
      if(Objects.equals(coffee[2], coffee[3])){
        if(Objects.equals(coffee[4], coffee[5])) System.out.println("Yes");
        else System.out.println("No");
      } else System.out.println("No");
    } main {
      Scanner scan = new Scanner(System.in);
      String str = scan.nextLine();
      String[] coffee = str.split("");
      if(Objects.equals(coffee[2], coffee[3])){
        if(Objects.equals(coffee[4], coffee[5])) System.out.println("Yes");
        else System.out.println("No");
      } else System.out.println("No");
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan String[] coffee = str.split(""); coffee str.split("") str.split str "" if(Objects.equals(coffee[2], coffee[3])){
        if(Objects.equals(coffee[4], coffee[5])) System.out.println("Yes");
        else System.out.println("No");
      } else System.out.println("No"); Objects.equals(coffee[2], coffee[3]) Objects.equals Objects coffee[2] coffee 2 coffee[3] coffee 3 {
        if(Objects.equals(coffee[4], coffee[5])) System.out.println("Yes");
        else System.out.println("No");
      } if(Objects.equals(coffee[4], coffee[5])) System.out.println("Yes");
        else System.out.println("No"); Objects.equals(coffee[4], coffee[5]) Objects.equals Objects coffee[4] coffee 4 coffee[5] coffee 5 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 scan = new Scanner(System.in);
      String str = scan.nextLine();
      String[] coffee = str.split("");
      if(Objects.equals(coffee[2], coffee[3])){
        if(Objects.equals(coffee[4], coffee[5])) System.out.println("Yes");
        else System.out.println("No");
      } else System.out.println("No");
    }
}