import java.util.*;
 
class Main{
  public static void main(String[] args){
    Scanner scan=new Scanner(System.in);
    String in=scan.next();
    String input[]=in.split("");
    boolean flag=true;
    if(input[2].equals(input[3]) && input[4].equals(input[5])){
      flag=false;
    }
    if(flag){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  }
} import java.util.*; util.* java class Main{
  public static void main(String[] args){
    Scanner scan=new Scanner(System.in);
    String in=scan.next();
    String input[]=in.split("");
    boolean flag=true;
    if(input[2].equals(input[3]) && input[4].equals(input[5])){
      flag=false;
    }
    if(flag){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  }
} Main public static void main(String[] args){
    Scanner scan=new Scanner(System.in);
    String in=scan.next();
    String input[]=in.split("");
    boolean flag=true;
    if(input[2].equals(input[3]) && input[4].equals(input[5])){
      flag=false;
    }
    if(flag){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  } main {
    Scanner scan=new Scanner(System.in);
    String in=scan.next();
    String input[]=in.split("");
    boolean flag=true;
    if(input[2].equals(input[3]) && input[4].equals(input[5])){
      flag=false;
    }
    if(flag){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  } Scanner scan=new Scanner(System.in); scan new Scanner(System.in) String in=scan.next(); in scan.next() scan.next scan String input[]=in.split(""); input in.split("") in.split in "" boolean flag=true; flag true if(input[2].equals(input[3]) && input[4].equals(input[5])){
      flag=false;
    } input[2].equals(input[3]) && input[4].equals(input[5]) input[2].equals(input[3]) input[2].equals input[2] input 2 input[3] input 3 input[4].equals(input[5]) input[4].equals input[4] input 4 input[5] input 5 {
      flag=false;
    } flag=false flag false if(flag){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    } flag {
      System.out.println("No");
    } System.out.println("No") System.out.println System.out System System.out "No" {
      System.out.println("Yes");
    } System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args
import java.util.*;
 
class Main{
  public static void main(String[] args){
    Scanner scan=new Scanner(System.in);
    String in=scan.next();
    String input[]=in.split("");
    boolean flag=true;
    if(input[2].equals(input[3]) && input[4].equals(input[5])){
      flag=false;
    }
    if(flag){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  }
}