import java.util.*;
import java.lang.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer st = new StringTokenizer(br.readLine());
        char[] s = st.nextToken().toCharArray();
        if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No");
//        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
//        bw.write("\n");
//        bw.close();
    }

} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer st = new StringTokenizer(br.readLine());
        char[] s = st.nextToken().toCharArray();
        if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No");
//        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
//        bw.write("\n");
//        bw.close();
    }

} Main public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer st = new StringTokenizer(br.readLine());
        char[] s = st.nextToken().toCharArray();
        if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No");
//        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
//        bw.write("\n");
//        bw.close();
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer st = new StringTokenizer(br.readLine());
        char[] s = st.nextToken().toCharArray();
        if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No");
//        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
//        bw.write("\n");
//        bw.close();
    } BufferedReader br = new BufferedReader(new InputStreamReader((System.in))); br new BufferedReader(new InputStreamReader((System.in))) StringTokenizer st = new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) char[] s = st.nextToken().toCharArray(); s st.nextToken().toCharArray() st.nextToken().toCharArray st.nextToken() st.nextToken st if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No"); s[2] == s[3] && s[4] == s[5] s[2] == s[3] s[2] s 2 s[3] s 3 s[4] == s[5] s[4] s 4 s[5] s 5 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer st = new StringTokenizer(br.readLine());
        char[] s = st.nextToken().toCharArray();
        if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No");
//        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
//        bw.write("\n");
//        bw.close();
    }

} public class Main {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer st = new StringTokenizer(br.readLine());
        char[] s = st.nextToken().toCharArray();
        if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No");
//        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
//        bw.write("\n");
//        bw.close();
    }

} Main
import java.util.*;
import java.lang.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer st = new StringTokenizer(br.readLine());
        char[] s = st.nextToken().toCharArray();
        if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No");
//        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
//        bw.write("\n");
//        bw.close();
    }

}