import java.util.*;
import java.io.*;
public class Main{
	static final int MOD=998244353;
	public static void main(String[] args) throws IOException{
		BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out= new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		
		String s=in.readLine();
		if(s.charAt(2)==s.charAt(3)&&s.charAt(4)==s.charAt(5))
			out.append("Yes\n");
		else
			out.append("No\n");
		
		out.flush();
		in.close();
		out.close();
	}
}      import java.util.*; util.* java import java.io.*; io.* java public class Main{
	static final int MOD=998244353;
	public static void main(String[] args) throws IOException{
		BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out= new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		
		String s=in.readLine();
		if(s.charAt(2)==s.charAt(3)&&s.charAt(4)==s.charAt(5))
			out.append("Yes\n");
		else
			out.append("No\n");
		
		out.flush();
		in.close();
		out.close();
	}
} Main static final int MOD=998244353; MOD 998244353 public static void main(String[] args) throws IOException{
		BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out= new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		
		String s=in.readLine();
		if(s.charAt(2)==s.charAt(3)&&s.charAt(4)==s.charAt(5))
			out.append("Yes\n");
		else
			out.append("No\n");
		
		out.flush();
		in.close();
		out.close();
	} main {
		BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out= new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		
		String s=in.readLine();
		if(s.charAt(2)==s.charAt(3)&&s.charAt(4)==s.charAt(5))
			out.append("Yes\n");
		else
			out.append("No\n");
		
		out.flush();
		in.close();
		out.close();
	} BufferedReader in= new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) PrintWriter out= new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); out new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) String s=in.readLine(); s in.readLine() in.readLine in if(s.charAt(2)==s.charAt(3)&&s.charAt(4)==s.charAt(5))
			out.append("Yes\n");
		else
			out.append("No\n"); 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 out.append("Yes\n") out.append out "Yes\n" out.append("No\n") out.append out "No\n" out.flush() out.flush out in.close() in.close in out.close() out.close out String[] args args public class Main{
	static final int MOD=998244353;
	public static void main(String[] args) throws IOException{
		BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out= new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		
		String s=in.readLine();
		if(s.charAt(2)==s.charAt(3)&&s.charAt(4)==s.charAt(5))
			out.append("Yes\n");
		else
			out.append("No\n");
		
		out.flush();
		in.close();
		out.close();
	}
} public class Main{
	static final int MOD=998244353;
	public static void main(String[] args) throws IOException{
		BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out= new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		
		String s=in.readLine();
		if(s.charAt(2)==s.charAt(3)&&s.charAt(4)==s.charAt(5))
			out.append("Yes\n");
		else
			out.append("No\n");
		
		out.flush();
		in.close();
		out.close();
	}
} Main
import java.util.*;
import java.io.*;
public class Main{
	static final int MOD=998244353;
	public static void main(String[] args) throws IOException{
		BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out= new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		
		String s=in.readLine();
		if(s.charAt(2)==s.charAt(3)&&s.charAt(4)==s.charAt(5))
			out.append("Yes\n");
		else
			out.append("No\n");
		
		out.flush();
		in.close();
		out.close();
	}
}     
