import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        char c[] = s.toCharArray();
        String ans = "";
        if(c[2]==c[3]&&c[4]==c[5]){
            ans = "Yes";
        }else{
            ans = "No";
        }
        System.out.println(ans);
    }
} import java.io.*; io.* java public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        char c[] = s.toCharArray();
        String ans = "";
        if(c[2]==c[3]&&c[4]==c[5]){
            ans = "Yes";
        }else{
            ans = "No";
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        char c[] = s.toCharArray();
        String ans = "";
        if(c[2]==c[3]&&c[4]==c[5]){
            ans = "Yes";
        }else{
            ans = "No";
        }
        System.out.println(ans);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        char c[] = s.toCharArray();
        String ans = "";
        if(c[2]==c[3]&&c[4]==c[5]){
            ans = "Yes";
        }else{
            ans = "No";
        }
        System.out.println(ans);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String s = br.readLine(); s br.readLine() br.readLine br char c[] = s.toCharArray(); c s.toCharArray() s.toCharArray s String ans = ""; ans "" if(c[2]==c[3]&&c[4]==c[5]){
            ans = "Yes";
        }else{
            ans = "No";
        } c[2]==c[3]&&c[4]==c[5] c[2]==c[3] c[2] c 2 c[3] c 3 c[4]==c[5] c[4] c 4 c[5] c 5 {
            ans = "Yes";
        } ans = "Yes" ans "Yes" {
            ans = "No";
        } ans = "No" ans "No" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        char c[] = s.toCharArray();
        String ans = "";
        if(c[2]==c[3]&&c[4]==c[5]){
            ans = "Yes";
        }else{
            ans = "No";
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        char c[] = s.toCharArray();
        String ans = "";
        if(c[2]==c[3]&&c[4]==c[5]){
            ans = "Yes";
        }else{
            ans = "No";
        }
        System.out.println(ans);
    }
} Main
import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        char c[] = s.toCharArray();
        String ans = "";
        if(c[2]==c[3]&&c[4]==c[5]){
            ans = "Yes";
        }else{
            ans = "No";
        }
        System.out.println(ans);
    }
}
