import java.util.*;
import static java.lang.System.out;

public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        //int a = Integer.parseInt(sc.next());
        //int b = Integer.parseInt(sc.next());
        //int c = Integer.parseInt(sc.next());
        String in = sc.nextLine();
        if(in.length() >= 4 &&
                in.substring(2,3).equals(in.substring(3,4))
                &&
            in.length() >= 6 &&
                    in.substring(4,5).equals(in.substring(5,6))) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        //System.out.println(a + " " + b + " " + c);

    }
} import java.util.*; util.* java import static java.lang.System.out; import static java.lang.System.out; import static java.lang.System.out; public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        //int a = Integer.parseInt(sc.next());
        //int b = Integer.parseInt(sc.next());
        //int c = Integer.parseInt(sc.next());
        String in = sc.nextLine();
        if(in.length() >= 4 &&
                in.substring(2,3).equals(in.substring(3,4))
                &&
            in.length() >= 6 &&
                    in.substring(4,5).equals(in.substring(5,6))) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        //System.out.println(a + " " + b + " " + c);

    }
} Main public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        //int a = Integer.parseInt(sc.next());
        //int b = Integer.parseInt(sc.next());
        //int c = Integer.parseInt(sc.next());
        String in = sc.nextLine();
        if(in.length() >= 4 &&
                in.substring(2,3).equals(in.substring(3,4))
                &&
            in.length() >= 6 &&
                    in.substring(4,5).equals(in.substring(5,6))) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        //System.out.println(a + " " + b + " " + c);

    } main {
        Scanner sc = new Scanner(System.in);
        //int a = Integer.parseInt(sc.next());
        //int b = Integer.parseInt(sc.next());
        //int c = Integer.parseInt(sc.next());
        String in = sc.nextLine();
        if(in.length() >= 4 &&
                in.substring(2,3).equals(in.substring(3,4))
                &&
            in.length() >= 6 &&
                    in.substring(4,5).equals(in.substring(5,6))) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        //System.out.println(a + " " + b + " " + c);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String in = sc.nextLine(); in sc.nextLine() sc.nextLine sc if(in.length() >= 4 &&
                in.substring(2,3).equals(in.substring(3,4))
                &&
            in.length() >= 6 &&
                    in.substring(4,5).equals(in.substring(5,6))) {
            out.println("Yes");
        } else {
            out.println("No");
        } in.length() >= 4 &&
                in.substring(2,3).equals(in.substring(3,4))
                &&
            in.length() >= 6 &&
                    in.substring(4,5).equals(in.substring(5,6)) in.length() >= 6 in.length() >= 4 &&
                in.substring(2,3).equals(in.substring(3,4))
                &&
            in.length() >= 6 &&
                    in.substring(4,5).equals(in.substring(5,6)) in.length() >= 4 in.length() in.length in 4 in.substring(2,3).equals(in.substring(3,4)) in.substring(2,3).equals in.substring(2,3) in.substring in 2 3 in.substring(3,4) in.substring in 3 4 in.length() >= 6 in.length() in.length in 6 in.substring(4,5).equals(in.substring(5,6)) in.substring(4,5).equals in.substring(4,5) in.substring in 4 5 in.substring(5,6) in.substring in 5 6 {
            out.println("Yes");
        } out.println("Yes") out.println out "Yes" {
            out.println("No");
        } out.println("No") out.println out "No" String... args args public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        //int a = Integer.parseInt(sc.next());
        //int b = Integer.parseInt(sc.next());
        //int c = Integer.parseInt(sc.next());
        String in = sc.nextLine();
        if(in.length() >= 4 &&
                in.substring(2,3).equals(in.substring(3,4))
                &&
            in.length() >= 6 &&
                    in.substring(4,5).equals(in.substring(5,6))) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        //System.out.println(a + " " + b + " " + c);

    }
} public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        //int a = Integer.parseInt(sc.next());
        //int b = Integer.parseInt(sc.next());
        //int c = Integer.parseInt(sc.next());
        String in = sc.nextLine();
        if(in.length() >= 4 &&
                in.substring(2,3).equals(in.substring(3,4))
                &&
            in.length() >= 6 &&
                    in.substring(4,5).equals(in.substring(5,6))) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        //System.out.println(a + " " + b + " " + c);

    }
} Main
import java.util.*;
import static java.lang.System.out;

public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        //int a = Integer.parseInt(sc.next());
        //int b = Integer.parseInt(sc.next());
        //int c = Integer.parseInt(sc.next());
        String in = sc.nextLine();
        if(in.length() >= 4 &&
                in.substring(2,3).equals(in.substring(3,4))
                &&
            in.length() >= 6 &&
                    in.substring(4,5).equals(in.substring(5,6))) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        //System.out.println(a + " " + b + " " + c);

    }
}