import java.util.*;
 
class Main {
	public static void main(String[] a){
    Scanner sc = new Scanner(System.in);
    String s = sc.nextLine();
    
     System.out.println(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5) ? "Yes" : "No");
    
    }
  
} import java.util.*; util.* java class Main {
	public static void main(String[] a){
    Scanner sc = new Scanner(System.in);
    String s = sc.nextLine();
    
     System.out.println(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5) ? "Yes" : "No");
    
    }
  
} Main public static void main(String[] a){
    Scanner sc = new Scanner(System.in);
    String s = sc.nextLine();
    
     System.out.println(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5) ? "Yes" : "No");
    
    } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.nextLine();
    
     System.out.println(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5) ? "Yes" : "No");
    
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc System.out.println(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5) ? "Yes" : "No") System.out.println System.out System System.out s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5) ? "Yes" : "No" s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5) s.charAt(2) == s.charAt(3) s.charAt(2) s.charAt s 2 s.charAt(3) s.charAt s 3 s.charAt(4) == s.charAt(5) s.charAt(4) s.charAt s 4 s.charAt(5) s.charAt s 5 "Yes" "No" String[] a a
import java.util.*;
 
class Main {
	public static void main(String[] a){
    Scanner sc = new Scanner(System.in);
    String s = sc.nextLine();
    
     System.out.println(s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5) ? "Yes" : "No");
    
    }
  
}