import java.util.*;

public class Main
{
	public static void main(String args[])
	{
		String a;
		Scanner s1=new Scanner(System.in);
		a=s1.nextLine();
		int b=a.length();
		if(b==6)
		{
			if(a.charAt(2)==a.charAt(3))
			{
				if(a.charAt(4)==a.charAt(5))
				{
					System.out.println("Yes");
				}
				else
				{System.out.println("No");}
			}
			else
			{System.out.println("No");}
		}
		else
		{System.out.println("No");}
	}
} import java.util.*; util.* java public class Main
{
	public static void main(String args[])
	{
		String a;
		Scanner s1=new Scanner(System.in);
		a=s1.nextLine();
		int b=a.length();
		if(b==6)
		{
			if(a.charAt(2)==a.charAt(3))
			{
				if(a.charAt(4)==a.charAt(5))
				{
					System.out.println("Yes");
				}
				else
				{System.out.println("No");}
			}
			else
			{System.out.println("No");}
		}
		else
		{System.out.println("No");}
	}
} Main public static void main(String args[])
	{
		String a;
		Scanner s1=new Scanner(System.in);
		a=s1.nextLine();
		int b=a.length();
		if(b==6)
		{
			if(a.charAt(2)==a.charAt(3))
			{
				if(a.charAt(4)==a.charAt(5))
				{
					System.out.println("Yes");
				}
				else
				{System.out.println("No");}
			}
			else
			{System.out.println("No");}
		}
		else
		{System.out.println("No");}
	} main {
		String a;
		Scanner s1=new Scanner(System.in);
		a=s1.nextLine();
		int b=a.length();
		if(b==6)
		{
			if(a.charAt(2)==a.charAt(3))
			{
				if(a.charAt(4)==a.charAt(5))
				{
					System.out.println("Yes");
				}
				else
				{System.out.println("No");}
			}
			else
			{System.out.println("No");}
		}
		else
		{System.out.println("No");}
	} String a; a Scanner s1=new Scanner(System.in); s1 new Scanner(System.in) a=s1.nextLine() a s1.nextLine() s1.nextLine s1 int b=a.length(); b a.length() a.length a if(b==6)
		{
			if(a.charAt(2)==a.charAt(3))
			{
				if(a.charAt(4)==a.charAt(5))
				{
					System.out.println("Yes");
				}
				else
				{System.out.println("No");}
			}
			else
			{System.out.println("No");}
		}
		else
		{System.out.println("No");} b==6 b 6 {
			if(a.charAt(2)==a.charAt(3))
			{
				if(a.charAt(4)==a.charAt(5))
				{
					System.out.println("Yes");
				}
				else
				{System.out.println("No");}
			}
			else
			{System.out.println("No");}
		} if(a.charAt(2)==a.charAt(3))
			{
				if(a.charAt(4)==a.charAt(5))
				{
					System.out.println("Yes");
				}
				else
				{System.out.println("No");}
			}
			else
			{System.out.println("No");} a.charAt(2)==a.charAt(3) a.charAt(2) a.charAt a 2 a.charAt(3) a.charAt a 3 {
				if(a.charAt(4)==a.charAt(5))
				{
					System.out.println("Yes");
				}
				else
				{System.out.println("No");}
			} if(a.charAt(4)==a.charAt(5))
				{
					System.out.println("Yes");
				}
				else
				{System.out.println("No");} a.charAt(4)==a.charAt(5) a.charAt(4) a.charAt a 4 a.charAt(5) a.charAt a 5 {
					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" {System.out.println("No");} System.out.println("No") System.out.println System.out System System.out "No" {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[])
	{
		String a;
		Scanner s1=new Scanner(System.in);
		a=s1.nextLine();
		int b=a.length();
		if(b==6)
		{
			if(a.charAt(2)==a.charAt(3))
			{
				if(a.charAt(4)==a.charAt(5))
				{
					System.out.println("Yes");
				}
				else
				{System.out.println("No");}
			}
			else
			{System.out.println("No");}
		}
		else
		{System.out.println("No");}
	}
} public class Main
{
	public static void main(String args[])
	{
		String a;
		Scanner s1=new Scanner(System.in);
		a=s1.nextLine();
		int b=a.length();
		if(b==6)
		{
			if(a.charAt(2)==a.charAt(3))
			{
				if(a.charAt(4)==a.charAt(5))
				{
					System.out.println("Yes");
				}
				else
				{System.out.println("No");}
			}
			else
			{System.out.println("No");}
		}
		else
		{System.out.println("No");}
	}
} Main
import java.util.*;

public class Main
{
	public static void main(String args[])
	{
		String a;
		Scanner s1=new Scanner(System.in);
		a=s1.nextLine();
		int b=a.length();
		if(b==6)
		{
			if(a.charAt(2)==a.charAt(3))
			{
				if(a.charAt(4)==a.charAt(5))
				{
					System.out.println("Yes");
				}
				else
				{System.out.println("No");}
			}
			else
			{System.out.println("No");}
		}
		else
		{System.out.println("No");}
	}
}