import java.util.*;


class Main{
public static void main(String[] args) {
  Scanner reader=new Scanner(System.in);
  String a =reader.next();
  if(a.charAt(2)==a.charAt(3)&&a.charAt(4)==a.charAt(5))
  {
    System.out.println("Yes");
    return;
  }
  System.out.println("No");


}
} import java.util.*; util.* java class Main{
public static void main(String[] args) {
  Scanner reader=new Scanner(System.in);
  String a =reader.next();
  if(a.charAt(2)==a.charAt(3)&&a.charAt(4)==a.charAt(5))
  {
    System.out.println("Yes");
    return;
  }
  System.out.println("No");


}
} Main public static void main(String[] args) {
  Scanner reader=new Scanner(System.in);
  String a =reader.next();
  if(a.charAt(2)==a.charAt(3)&&a.charAt(4)==a.charAt(5))
  {
    System.out.println("Yes");
    return;
  }
  System.out.println("No");


} main {
  Scanner reader=new Scanner(System.in);
  String a =reader.next();
  if(a.charAt(2)==a.charAt(3)&&a.charAt(4)==a.charAt(5))
  {
    System.out.println("Yes");
    return;
  }
  System.out.println("No");


} Scanner reader=new Scanner(System.in); reader new Scanner(System.in) String a =reader.next(); a reader.next() reader.next reader if(a.charAt(2)==a.charAt(3)&&a.charAt(4)==a.charAt(5))
  {
    System.out.println("Yes");
    return;
  } a.charAt(2)==a.charAt(3)&&a.charAt(4)==a.charAt(5) a.charAt(2)==a.charAt(3) a.charAt(2) a.charAt a 2 a.charAt(3) a.charAt a 3 a.charAt(4)==a.charAt(5) a.charAt(4) a.charAt a 4 a.charAt(5) a.charAt a 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.*;


class Main{
public static void main(String[] args) {
  Scanner reader=new Scanner(System.in);
  String a =reader.next();
  if(a.charAt(2)==a.charAt(3)&&a.charAt(4)==a.charAt(5))
  {
    System.out.println("Yes");
    return;
  }
  System.out.println("No");


}
}
