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

public class Main {
    static final String YES = "Yes";
    static final String NO = "No";

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        String S;
        S = sc.next();

        final Solver solver = new Solver();
        System.out.println(solver.solve(S) ? YES : NO);
    }
}

class Solver {
    public boolean solve(String S) {
        return S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5);
    }
}
 import java.io.*; io.* java import java.util.*; util.* java public class Main {
    static final String YES = "Yes";
    static final String NO = "No";

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        String S;
        S = sc.next();

        final Solver solver = new Solver();
        System.out.println(solver.solve(S) ? YES : NO);
    }
} Main static final String YES = "Yes"; YES "Yes" static final String NO = "No"; NO "No" public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        String S;
        S = sc.next();

        final Solver solver = new Solver();
        System.out.println(solver.solve(S) ? YES : NO);
    } main {
        final Scanner sc = new Scanner(System.in);
        String S;
        S = sc.next();

        final Solver solver = new Solver();
        System.out.println(solver.solve(S) ? YES : NO);
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S; S S = sc.next() S sc.next() sc.next sc final Solver solver = new Solver(); solver new Solver() System.out.println(solver.solve(S) ? YES : NO) System.out.println System.out System System.out solver.solve(S) ? YES : NO solver.solve(S) solver.solve solver S YES NO final String[] args args class Solver {
    public boolean solve(String S) {
        return S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5);
    }
} Solver public boolean solve(String S) {
        return S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5);
    } solve {
        return S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5);
    } return S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5); S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5) S.charAt(2) == S.charAt(3) S.charAt(2) S.charAt S 2 S.charAt(3) S.charAt S 3 S.charAt(4) == S.charAt(5) S.charAt(4) S.charAt S 4 S.charAt(5) S.charAt S 5 String S S public class Main {
    static final String YES = "Yes";
    static final String NO = "No";

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        String S;
        S = sc.next();

        final Solver solver = new Solver();
        System.out.println(solver.solve(S) ? YES : NO);
    }
} public class Main {
    static final String YES = "Yes";
    static final String NO = "No";

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        String S;
        S = sc.next();

        final Solver solver = new Solver();
        System.out.println(solver.solve(S) ? YES : NO);
    }
} Main
import java.io.*;
import java.util.*;

public class Main {
    static final String YES = "Yes";
    static final String NO = "No";

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        String S;
        S = sc.next();

        final Solver solver = new Solver();
        System.out.println(solver.solve(S) ? YES : NO);
    }
}

class Solver {
    public boolean solve(String S) {
        return S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5);
    }
}

