import java.io.*;

public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        boolean flg =
            S.charAt (2) == S.charAt (3) && S.charAt (4) == S.charAt (5);
        System.out.println (flg ? "Yes" : "No");
    }
} import java.io.*; io.* java public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        boolean flg =
            S.charAt (2) == S.charAt (3) && S.charAt (4) == S.charAt (5);
        System.out.println (flg ? "Yes" : "No");
    }
} Main public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        boolean flg =
            S.charAt (2) == S.charAt (3) && S.charAt (4) == S.charAt (5);
        System.out.println (flg ? "Yes" : "No");
    } main {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        boolean flg =
            S.charAt (2) == S.charAt (3) && S.charAt (4) == S.charAt (5);
        System.out.println (flg ? "Yes" : "No");
    } BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in)); reader new BufferedReader (new InputStreamReader (System.in)) String S = reader.readLine(); S reader.readLine() reader.readLine reader boolean flg =
            S.charAt (2) == S.charAt (3) && S.charAt (4) == S.charAt (5); flg 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 System.out.println (flg ? "Yes" : "No") System.out.println System.out System System.out flg ? "Yes" : "No" flg "Yes" "No" String[] args args public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        boolean flg =
            S.charAt (2) == S.charAt (3) && S.charAt (4) == S.charAt (5);
        System.out.println (flg ? "Yes" : "No");
    }
} public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        boolean flg =
            S.charAt (2) == S.charAt (3) && S.charAt (4) == S.charAt (5);
        System.out.println (flg ? "Yes" : "No");
    }
} Main
import java.io.*;

public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        boolean flg =
            S.charAt (2) == S.charAt (3) && S.charAt (4) == S.charAt (5);
        System.out.println (flg ? "Yes" : "No");
    }
}