import java.util.*;
public class Main
{
    public static void main(String[] args)
    {
        Scanner myObj = new Scanner(System.in);
        String inputStr = myObj.nextLine();
        char[] inputChar = inputStr.toCharArray();

        if (inputChar[2] == inputChar[3] && inputChar[4] == inputChar[5])
        {
            System.out.print("Yes");
        }
        else {
            System.out.print("No");
        }
    }
} import java.util.*; util.* java public class Main
{
    public static void main(String[] args)
    {
        Scanner myObj = new Scanner(System.in);
        String inputStr = myObj.nextLine();
        char[] inputChar = inputStr.toCharArray();

        if (inputChar[2] == inputChar[3] && inputChar[4] == inputChar[5])
        {
            System.out.print("Yes");
        }
        else {
            System.out.print("No");
        }
    }
} Main public static void main(String[] args)
    {
        Scanner myObj = new Scanner(System.in);
        String inputStr = myObj.nextLine();
        char[] inputChar = inputStr.toCharArray();

        if (inputChar[2] == inputChar[3] && inputChar[4] == inputChar[5])
        {
            System.out.print("Yes");
        }
        else {
            System.out.print("No");
        }
    } main {
        Scanner myObj = new Scanner(System.in);
        String inputStr = myObj.nextLine();
        char[] inputChar = inputStr.toCharArray();

        if (inputChar[2] == inputChar[3] && inputChar[4] == inputChar[5])
        {
            System.out.print("Yes");
        }
        else {
            System.out.print("No");
        }
    } Scanner myObj = new Scanner(System.in); myObj new Scanner(System.in) String inputStr = myObj.nextLine(); inputStr myObj.nextLine() myObj.nextLine myObj char[] inputChar = inputStr.toCharArray(); inputChar inputStr.toCharArray() inputStr.toCharArray inputStr if (inputChar[2] == inputChar[3] && inputChar[4] == inputChar[5])
        {
            System.out.print("Yes");
        }
        else {
            System.out.print("No");
        } inputChar[2] == inputChar[3] && inputChar[4] == inputChar[5] inputChar[2] == inputChar[3] inputChar[2] inputChar 2 inputChar[3] inputChar 3 inputChar[4] == inputChar[5] inputChar[4] inputChar 4 inputChar[5] inputChar 5 {
            System.out.print("Yes");
        } System.out.print("Yes") System.out.print System.out System System.out "Yes" {
            System.out.print("No");
        } System.out.print("No") System.out.print System.out System System.out "No" String[] args args public class Main
{
    public static void main(String[] args)
    {
        Scanner myObj = new Scanner(System.in);
        String inputStr = myObj.nextLine();
        char[] inputChar = inputStr.toCharArray();

        if (inputChar[2] == inputChar[3] && inputChar[4] == inputChar[5])
        {
            System.out.print("Yes");
        }
        else {
            System.out.print("No");
        }
    }
} public class Main
{
    public static void main(String[] args)
    {
        Scanner myObj = new Scanner(System.in);
        String inputStr = myObj.nextLine();
        char[] inputChar = inputStr.toCharArray();

        if (inputChar[2] == inputChar[3] && inputChar[4] == inputChar[5])
        {
            System.out.print("Yes");
        }
        else {
            System.out.print("No");
        }
    }
} Main
import java.util.*;
public class Main
{
    public static void main(String[] args)
    {
        Scanner myObj = new Scanner(System.in);
        String inputStr = myObj.nextLine();
        char[] inputChar = inputStr.toCharArray();

        if (inputChar[2] == inputChar[3] && inputChar[4] == inputChar[5])
        {
            System.out.print("Yes");
        }
        else {
            System.out.print("No");
        }
    }
}
