// No sorceries shall prevail. //           
import java.util.*;
import java.io.*;
public class Main {
	
	static long gcd(long a, long b) { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    }
	static int gcd(int a, int b) { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    }
	
	static long mod = 1000000007;
	public static void main(String args[]) {
		Scanner inp=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		
		String s=inp.next();
    	int n=s.length();
    	out.println(s.charAt(2)==s.charAt(3) && s.charAt(4)==s.charAt(5)?"Yes":"No");
		
		out.close();
		inp.close();
	}
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
	
	static long gcd(long a, long b) { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    }
	static int gcd(int a, int b) { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    }
	
	static long mod = 1000000007;
	public static void main(String args[]) {
		Scanner inp=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		
		String s=inp.next();
    	int n=s.length();
    	out.println(s.charAt(2)==s.charAt(3) && s.charAt(4)==s.charAt(5)?"Yes":"No");
		
		out.close();
		inp.close();
	}
} Main static long mod = 1000000007; mod 1000000007 static long gcd(long a, long b) { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    } gcd { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    } if (b == 0) 
	        return a; b == 0 b 0 return a; a return gcd(b, a % b); gcd(b, a % b) gcd b a % b a b long a a long b b static int gcd(int a, int b) { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    } gcd { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    } if (b == 0) 
	        return a; b == 0 b 0 return a; a return gcd(b, a % b); gcd(b, a % b) gcd b a % b a b int a a int b b public static void main(String args[]) {
		Scanner inp=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		
		String s=inp.next();
    	int n=s.length();
    	out.println(s.charAt(2)==s.charAt(3) && s.charAt(4)==s.charAt(5)?"Yes":"No");
		
		out.close();
		inp.close();
	} main {
		Scanner inp=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		
		String s=inp.next();
    	int n=s.length();
    	out.println(s.charAt(2)==s.charAt(3) && s.charAt(4)==s.charAt(5)?"Yes":"No");
		
		out.close();
		inp.close();
	} Scanner inp=new Scanner(System.in); inp new Scanner(System.in) PrintWriter out=new PrintWriter(System.out); out new PrintWriter(System.out) String s=inp.next(); s inp.next() inp.next inp int n=s.length(); n s.length() s.length s out.println(s.charAt(2)==s.charAt(3) && s.charAt(4)==s.charAt(5)?"Yes":"No") out.println 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" out.close() out.close out inp.close() inp.close inp String args[] args public class Main {
	
	static long gcd(long a, long b) { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    }
	static int gcd(int a, int b) { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    }
	
	static long mod = 1000000007;
	public static void main(String args[]) {
		Scanner inp=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		
		String s=inp.next();
    	int n=s.length();
    	out.println(s.charAt(2)==s.charAt(3) && s.charAt(4)==s.charAt(5)?"Yes":"No");
		
		out.close();
		inp.close();
	}
} public class Main {
	
	static long gcd(long a, long b) { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    }
	static int gcd(int a, int b) { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    }
	
	static long mod = 1000000007;
	public static void main(String args[]) {
		Scanner inp=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		
		String s=inp.next();
    	int n=s.length();
    	out.println(s.charAt(2)==s.charAt(3) && s.charAt(4)==s.charAt(5)?"Yes":"No");
		
		out.close();
		inp.close();
	}
} Main
// No sorceries shall prevail. //           
import java.util.*;
import java.io.*;
public class Main {
	
	static long gcd(long a, long b) { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    }
	static int gcd(int a, int b) { 
	      if (b == 0) 
	        return a; 
	      return gcd(b, a % b);  
	    }
	
	static long mod = 1000000007;
	public static void main(String args[]) {
		Scanner inp=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		
		String s=inp.next();
    	int n=s.length();
    	out.println(s.charAt(2)==s.charAt(3) && s.charAt(4)==s.charAt(5)?"Yes":"No");
		
		out.close();
		inp.close();
	}
}