import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      String S = sc.next();
      String a = S.substring(2,3);
      String b = S.substring(3,4);
      String c = S.substring(4,5);
      String d = S.substring(5,6);
      if(a.equals(b)&&c.equals(d)){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      String S = sc.next();
      String a = S.substring(2,3);
      String b = S.substring(3,4);
      String c = S.substring(4,5);
      String d = S.substring(5,6);
      if(a.equals(b)&&c.equals(d)){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      String S = sc.next();
      String a = S.substring(2,3);
      String b = S.substring(3,4);
      String c = S.substring(4,5);
      String d = S.substring(5,6);
      if(a.equals(b)&&c.equals(d)){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    } main {
		Scanner sc = new Scanner(System.in);
      String S = sc.next();
      String a = S.substring(2,3);
      String b = S.substring(3,4);
      String c = S.substring(4,5);
      String d = S.substring(5,6);
      if(a.equals(b)&&c.equals(d)){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String a = S.substring(2,3); a S.substring(2,3) S.substring S 2 3 String b = S.substring(3,4); b S.substring(3,4) S.substring S 3 4 String c = S.substring(4,5); c S.substring(4,5) S.substring S 4 5 String d = S.substring(5,6); d S.substring(5,6) S.substring S 5 6 if(a.equals(b)&&c.equals(d)){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      } a.equals(b)&&c.equals(d) a.equals(b) a.equals a b c.equals(d) c.equals c d {
        System.out.println("Yes");
      } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
        System.out.println("No");
      } System.out.println("No") System.out.println 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 S = sc.next();
      String a = S.substring(2,3);
      String b = S.substring(3,4);
      String c = S.substring(4,5);
      String d = S.substring(5,6);
      if(a.equals(b)&&c.equals(d)){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      String S = sc.next();
      String a = S.substring(2,3);
      String b = S.substring(3,4);
      String c = S.substring(4,5);
      String d = S.substring(5,6);
      if(a.equals(b)&&c.equals(d)){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      String S = sc.next();
      String a = S.substring(2,3);
      String b = S.substring(3,4);
      String c = S.substring(4,5);
      String d = S.substring(5,6);
      if(a.equals(b)&&c.equals(d)){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
}