import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner tan = new Scanner(System.in);
        int i=0;
        String st=tan.next();
        char []c=new char[st.length()];
        for(char ch : st.toCharArray()){
            c[i]=ch;
            i++;
        }
        if(c[2]==c[3] && c[4]==c[5])
            System.out.println("Yes");
        else 
            System.out.println("No");
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner tan = new Scanner(System.in);
        int i=0;
        String st=tan.next();
        char []c=new char[st.length()];
        for(char ch : st.toCharArray()){
            c[i]=ch;
            i++;
        }
        if(c[2]==c[3] && c[4]==c[5])
            System.out.println("Yes");
        else 
            System.out.println("No");
    }
} Main public static void main(String[] args) {
        Scanner tan = new Scanner(System.in);
        int i=0;
        String st=tan.next();
        char []c=new char[st.length()];
        for(char ch : st.toCharArray()){
            c[i]=ch;
            i++;
        }
        if(c[2]==c[3] && c[4]==c[5])
            System.out.println("Yes");
        else 
            System.out.println("No");
    } main {
        Scanner tan = new Scanner(System.in);
        int i=0;
        String st=tan.next();
        char []c=new char[st.length()];
        for(char ch : st.toCharArray()){
            c[i]=ch;
            i++;
        }
        if(c[2]==c[3] && c[4]==c[5])
            System.out.println("Yes");
        else 
            System.out.println("No");
    } Scanner tan = new Scanner(System.in); tan new Scanner(System.in) int i=0; i 0 String st=tan.next(); st tan.next() tan.next tan char []c=new char[st.length()]; c new char[st.length()] st.length() st.length st for(char ch : st.toCharArray()){
            c[i]=ch;
            i++;
        } char ch st.toCharArray() st.toCharArray st {
            c[i]=ch;
            i++;
        } {
            c[i]=ch;
            i++;
        } c[i]=ch c[i] c i ch i++ i if(c[2]==c[3] && c[4]==c[5])
            System.out.println("Yes");
        else 
            System.out.println("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 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) {
        Scanner tan = new Scanner(System.in);
        int i=0;
        String st=tan.next();
        char []c=new char[st.length()];
        for(char ch : st.toCharArray()){
            c[i]=ch;
            i++;
        }
        if(c[2]==c[3] && c[4]==c[5])
            System.out.println("Yes");
        else 
            System.out.println("No");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner tan = new Scanner(System.in);
        int i=0;
        String st=tan.next();
        char []c=new char[st.length()];
        for(char ch : st.toCharArray()){
            c[i]=ch;
            i++;
        }
        if(c[2]==c[3] && c[4]==c[5])
            System.out.println("Yes");
        else 
            System.out.println("No");
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner tan = new Scanner(System.in);
        int i=0;
        String st=tan.next();
        char []c=new char[st.length()];
        for(char ch : st.toCharArray()){
            c[i]=ch;
            i++;
        }
        if(c[2]==c[3] && c[4]==c[5])
            System.out.println("Yes");
        else 
            System.out.println("No");
    }
}
