import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in); 
		String n = sc.nextLine(); 
		
		if (n.charAt(5)==n.charAt(4) && n.charAt(3)==n.charAt(2))
		    System.out.println("Yes");
		    
		else
		    System.out.println("No");
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in); 
		String n = sc.nextLine(); 
		
		if (n.charAt(5)==n.charAt(4) && n.charAt(3)==n.charAt(2))
		    System.out.println("Yes");
		    
		else
		    System.out.println("No");
	}
} Main public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in); 
		String n = sc.nextLine(); 
		
		if (n.charAt(5)==n.charAt(4) && n.charAt(3)==n.charAt(2))
		    System.out.println("Yes");
		    
		else
		    System.out.println("No");
	} main {
		Scanner sc = new Scanner(System.in); 
		String n = sc.nextLine(); 
		
		if (n.charAt(5)==n.charAt(4) && n.charAt(3)==n.charAt(2))
		    System.out.println("Yes");
		    
		else
		    System.out.println("No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String n = sc.nextLine(); n sc.nextLine() sc.nextLine sc if (n.charAt(5)==n.charAt(4) && n.charAt(3)==n.charAt(2))
		    System.out.println("Yes");
		    
		else
		    System.out.println("No"); n.charAt(5)==n.charAt(4) && n.charAt(3)==n.charAt(2) n.charAt(5)==n.charAt(4) n.charAt(5) n.charAt n 5 n.charAt(4) n.charAt n 4 n.charAt(3)==n.charAt(2) n.charAt(3) n.charAt n 3 n.charAt(2) n.charAt n 2 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args
import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in); 
		String n = sc.nextLine(); 
		
		if (n.charAt(5)==n.charAt(4) && n.charAt(3)==n.charAt(2))
		    System.out.println("Yes");
		    
		else
		    System.out.println("No");
	}
}
