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

public class Main {
    public static void main(String[] args)
    {
        Scanner s = new Scanner(System.in);
        String S = s.nextLine();
        if(S.substring(2,3).equals(S.substring(3,4)) && S.substring(4,5).equals(S.substring(5,6)))
            System.out.println("Yes");
        else
            System.out.println("No");
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args)
    {
        Scanner s = new Scanner(System.in);
        String S = s.nextLine();
        if(S.substring(2,3).equals(S.substring(3,4)) && S.substring(4,5).equals(S.substring(5,6)))
            System.out.println("Yes");
        else
            System.out.println("No");
    }
} Main public static void main(String[] args)
    {
        Scanner s = new Scanner(System.in);
        String S = s.nextLine();
        if(S.substring(2,3).equals(S.substring(3,4)) && S.substring(4,5).equals(S.substring(5,6)))
            System.out.println("Yes");
        else
            System.out.println("No");
    } main {
        Scanner s = new Scanner(System.in);
        String S = s.nextLine();
        if(S.substring(2,3).equals(S.substring(3,4)) && S.substring(4,5).equals(S.substring(5,6)))
            System.out.println("Yes");
        else
            System.out.println("No");
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) String S = s.nextLine(); S s.nextLine() s.nextLine s if(S.substring(2,3).equals(S.substring(3,4)) && S.substring(4,5).equals(S.substring(5,6)))
            System.out.println("Yes");
        else
            System.out.println("No"); S.substring(2,3).equals(S.substring(3,4)) && S.substring(4,5).equals(S.substring(5,6)) S.substring(2,3).equals(S.substring(3,4)) S.substring(2,3).equals S.substring(2,3) S.substring S 2 3 S.substring(3,4) S.substring S 3 4 S.substring(4,5).equals(S.substring(5,6)) S.substring(4,5).equals S.substring(4,5) S.substring S 4 5 S.substring(5,6) S.substring S 5 6 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 public class Main {
    public static void main(String[] args)
    {
        Scanner s = new Scanner(System.in);
        String S = s.nextLine();
        if(S.substring(2,3).equals(S.substring(3,4)) && S.substring(4,5).equals(S.substring(5,6)))
            System.out.println("Yes");
        else
            System.out.println("No");
    }
} public class Main {
    public static void main(String[] args)
    {
        Scanner s = new Scanner(System.in);
        String S = s.nextLine();
        if(S.substring(2,3).equals(S.substring(3,4)) && S.substring(4,5).equals(S.substring(5,6)))
            System.out.println("Yes");
        else
            System.out.println("No");
    }
} Main
import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args)
    {
        Scanner s = new Scanner(System.in);
        String S = s.nextLine();
        if(S.substring(2,3).equals(S.substring(3,4)) && S.substring(4,5).equals(S.substring(5,6)))
            System.out.println("Yes");
        else
            System.out.println("No");
    }
}
