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

public class Main {

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();

        if(ch[2]==ch[3] && ch[4]==ch[5])
        	System.out.println("Yes");
        else
        	System.out.println("No");
      
        sc.close();
    }

} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main {

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();

        if(ch[2]==ch[3] && ch[4]==ch[5])
        	System.out.println("Yes");
        else
        	System.out.println("No");
      
        sc.close();
    }

} Main public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();

        if(ch[2]==ch[3] && ch[4]==ch[5])
        	System.out.println("Yes");
        else
        	System.out.println("No");
      
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();

        if(ch[2]==ch[3] && ch[4]==ch[5])
        	System.out.println("Yes");
        else
        	System.out.println("No");
      
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc char[] ch = str.toCharArray(); ch str.toCharArray() str.toCharArray str if(ch[2]==ch[3] && ch[4]==ch[5])
        	System.out.println("Yes");
        else
        	System.out.println("No"); 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 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" sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();

        if(ch[2]==ch[3] && ch[4]==ch[5])
        	System.out.println("Yes");
        else
        	System.out.println("No");
      
        sc.close();
    }

} public class Main {

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();

        if(ch[2]==ch[3] && ch[4]==ch[5])
        	System.out.println("Yes");
        else
        	System.out.println("No");
      
        sc.close();
    }

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

public class Main {

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();

        if(ch[2]==ch[3] && ch[4]==ch[5])
        	System.out.println("Yes");
        else
        	System.out.println("No");
      
        sc.close();
    }

}
