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");
    }
} import java.io.*; io.* java 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");
    }
} 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;
    } toCharacterArray {
        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;
    } if (s == null) {
            return null;
        } s == null s null {
            return null;
        } return null; null int len = s.length(); len s.length() s.length s Character[] array = new Character[len]; array new Character[len] len for (int i = 0; i < len; i++) {
            array[i] = new Character (s.charAt (i));
        } int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
            array[i] = new Character (s.charAt (i));
        } {
            array[i] = new Character (s.charAt (i));
        } array[i] = new Character (s.charAt (i)) array[i] array i new Character (s.charAt (i)) return array; array String s s 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");
    } main {
        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");
    } BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in)); reader new BufferedReader (new InputStreamReader (System.in)) Character[] S = toCharacterArray (reader.readLine()); S toCharacterArray (reader.readLine()) toCharacterArray reader.readLine() reader.readLine reader boolean flg = S[2].equals (S[3]) && S[4].equals (S[5]); flg S[2].equals (S[3]) && S[4].equals (S[5]) S[2].equals (S[3]) S[2].equals S[2] S 2 S[3] S 3 S[4].equals (S[5]) S[4].equals S[4] S 4 S[5] 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 {
    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");
    }
} 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");
    }
} Main
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");
    }
}