import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] splitS = S.split("");
        boolean result = splitS[2].equals(splitS[3]) && splitS[4].equals(splitS[5]);
        System.out.println(result ? "Yes" : "No");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] splitS = S.split("");
        boolean result = splitS[2].equals(splitS[3]) && splitS[4].equals(splitS[5]);
        System.out.println(result ? "Yes" : "No");
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] splitS = S.split("");
        boolean result = splitS[2].equals(splitS[3]) && splitS[4].equals(splitS[5]);
        System.out.println(result ? "Yes" : "No");
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] splitS = S.split("");
        boolean result = splitS[2].equals(splitS[3]) && splitS[4].equals(splitS[5]);
        System.out.println(result ? "Yes" : "No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String[] splitS = S.split(""); splitS S.split("") S.split S "" boolean result = splitS[2].equals(splitS[3]) && splitS[4].equals(splitS[5]); result splitS[2].equals(splitS[3]) && splitS[4].equals(splitS[5]) splitS[2].equals(splitS[3]) splitS[2].equals splitS[2] splitS 2 splitS[3] splitS 3 splitS[4].equals(splitS[5]) splitS[4].equals splitS[4] splitS 4 splitS[5] splitS 5 System.out.println(result ? "Yes" : "No") System.out.println System.out System System.out result ? "Yes" : "No" result "Yes" "No" String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] splitS = S.split("");
        boolean result = splitS[2].equals(splitS[3]) && splitS[4].equals(splitS[5]);
        System.out.println(result ? "Yes" : "No");
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] splitS = S.split("");
        boolean result = splitS[2].equals(splitS[3]) && splitS[4].equals(splitS[5]);
        System.out.println(result ? "Yes" : "No");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] splitS = S.split("");
        boolean result = splitS[2].equals(splitS[3]) && splitS[4].equals(splitS[5]);
        System.out.println(result ? "Yes" : "No");
    }
}
