import java.io.*;
import java.util.*;
import static java.lang.System.*;
import static java.lang.Math.*;

public class Main
{
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		//String []s=br.readLine().split(" ");
		String s=br.readLine(), ans="No";
		char ch[]=s.toCharArray();
		
				
		int len=s.length();
		if(len>=6)
			if(ch[2]==ch[3] && ch[4]==ch[5])
				ans="Yes";		
		
		out.println(ans);
		
		
	}
	
	
}

 import java.io.*; io.* java import java.util.*; util.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main
{
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		//String []s=br.readLine().split(" ");
		String s=br.readLine(), ans="No";
		char ch[]=s.toCharArray();
		
				
		int len=s.length();
		if(len>=6)
			if(ch[2]==ch[3] && ch[4]==ch[5])
				ans="Yes";		
		
		out.println(ans);
		
		
	}
	
	
} Main public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		//String []s=br.readLine().split(" ");
		String s=br.readLine(), ans="No";
		char ch[]=s.toCharArray();
		
				
		int len=s.length();
		if(len>=6)
			if(ch[2]==ch[3] && ch[4]==ch[5])
				ans="Yes";		
		
		out.println(ans);
		
		
	} main {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		//String []s=br.readLine().split(" ");
		String s=br.readLine(), ans="No";
		char ch[]=s.toCharArray();
		
				
		int len=s.length();
		if(len>=6)
			if(ch[2]==ch[3] && ch[4]==ch[5])
				ans="Yes";		
		
		out.println(ans);
		
		
	} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String s=br.readLine() s br.readLine() br.readLine br ans="No"; ans "No" char ch[]=s.toCharArray(); ch s.toCharArray() s.toCharArray s int len=s.length(); len s.length() s.length s if(len>=6)
			if(ch[2]==ch[3] && ch[4]==ch[5])
				ans="Yes"; len>=6 len 6 if(ch[2]==ch[3] && ch[4]==ch[5])
				ans="Yes"; ch[2]==ch[3] && ch[4]==ch[5] ch[2]==ch[3] ch[2] ch 2 ch[3] ch 3 ch[4]==ch[5] ch[4] ch 4 ch[5] ch 5 ans="Yes" ans "Yes" out.println(ans) out.println out ans String []args args public class Main
{
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		//String []s=br.readLine().split(" ");
		String s=br.readLine(), ans="No";
		char ch[]=s.toCharArray();
		
				
		int len=s.length();
		if(len>=6)
			if(ch[2]==ch[3] && ch[4]==ch[5])
				ans="Yes";		
		
		out.println(ans);
		
		
	}
	
	
} public class Main
{
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		//String []s=br.readLine().split(" ");
		String s=br.readLine(), ans="No";
		char ch[]=s.toCharArray();
		
				
		int len=s.length();
		if(len>=6)
			if(ch[2]==ch[3] && ch[4]==ch[5])
				ans="Yes";		
		
		out.println(ans);
		
		
	}
	
	
} Main
import java.io.*;
import java.util.*;
import static java.lang.System.*;
import static java.lang.Math.*;

public class Main
{
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		//String []s=br.readLine().split(" ");
		String s=br.readLine(), ans="No";
		char ch[]=s.toCharArray();
		
				
		int len=s.length();
		if(len>=6)
			if(ch[2]==ch[3] && ch[4]==ch[5])
				ans="Yes";		
		
		out.println(ans);
		
		
	}
	
	
}


