import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        System.out.println(solve(S) ? "Yes" : "No");

        sc.close();
    }

    static boolean solve(String S) {
        return S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        System.out.println(solve(S) ? "Yes" : "No");

        sc.close();
    }

    static boolean solve(String S) {
        return S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        System.out.println(solve(S) ? "Yes" : "No");

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        System.out.println(solve(S) ? "Yes" : "No");

        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc System.out.println(solve(S) ? "Yes" : "No") System.out.println System.out System System.out solve(S) ? "Yes" : "No" solve(S) solve S "Yes" "No" sc.close() sc.close sc String[] args args static 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 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        System.out.println(solve(S) ? "Yes" : "No");

        sc.close();
    }

    static boolean solve(String S) {
        return S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        System.out.println(solve(S) ? "Yes" : "No");

        sc.close();
    }

    static boolean solve(String S) {
        return S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        System.out.println(solve(S) ? "Yes" : "No");

        sc.close();
    }

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