import java.io.*;

public class Main {
    static Character[] toCharacterArray (String s) {
        if (s == null) {
            return null;
        }
        int len = s.length();
        Character[] array = new Character[len];
        for (int i = 0; i < len; i++) {
            array[i] = new Character (s.charAt (i));
        }
        return array;
    }
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        Character[] S = toCharacterArray (reader.readLine());
        boolean flg = S[2].equals (S[3]) && S[4].equals (S[5]);
        System.out.println (flg ? "Yes" : "No");
    }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz