import java.util.Scanner;
public class Main {


    public static void main(String[] args) {


        Scanner scan = new Scanner(System.in);
        String N = scan.next();
        String M[]=new String [6];

        for(int i=0;i<6;i++)
        { M[i]=N.substring(i,i+1);}
        if(M[2].equals(M[3])&&M[4].equals(M[5])){System.out.println("Yes");}
       else{System.out.println("No");}
//入力完了


/*
        for (int iii = 0; iii < (1 << N); iii++) {
                int PP=0;
                int S[] = new int[M];
                for (int j = 0; j < N; j++) {

                    if ((1 & iii >> j) == 1) {
                        for(int y=0;y<M;y++){S[y]=S[y]+A[j][y];}
                        PP=PP+C[j];
                    }

                }
                int K=0;
             for(int p=0;p<M;p++) {if(S[p]>=X){K=K+1;}  }
             if (K==M&&(P==-1||P>=PP)){P=PP;}
            }
*/

    }

}
 import java.util.Scanner; Scanner java.util public class Main {


    public static void main(String[] args) {


        Scanner scan = new Scanner(System.in);
        String N = scan.next();
        String M[]=new String [6];

        for(int i=0;i<6;i++)
        { M[i]=N.substring(i,i+1);}
        if(M[2].equals(M[3])&&M[4].equals(M[5])){System.out.println("Yes");}
       else{System.out.println("No");}
//入力完了


/*
        for (int iii = 0; iii < (1 << N); iii++) {
                int PP=0;
                int S[] = new int[M];
                for (int j = 0; j < N; j++) {

                    if ((1 & iii >> j) == 1) {
                        for(int y=0;y<M;y++){S[y]=S[y]+A[j][y];}
                        PP=PP+C[j];
                    }

                }
                int K=0;
             for(int p=0;p<M;p++) {if(S[p]>=X){K=K+1;}  }
             if (K==M&&(P==-1||P>=PP)){P=PP;}
            }
*/

    }

} Main public static void main(String[] args) {


        Scanner scan = new Scanner(System.in);
        String N = scan.next();
        String M[]=new String [6];

        for(int i=0;i<6;i++)
        { M[i]=N.substring(i,i+1);}
        if(M[2].equals(M[3])&&M[4].equals(M[5])){System.out.println("Yes");}
       else{System.out.println("No");}
//入力完了


/*
        for (int iii = 0; iii < (1 << N); iii++) {
                int PP=0;
                int S[] = new int[M];
                for (int j = 0; j < N; j++) {

                    if ((1 & iii >> j) == 1) {
                        for(int y=0;y<M;y++){S[y]=S[y]+A[j][y];}
                        PP=PP+C[j];
                    }

                }
                int K=0;
             for(int p=0;p<M;p++) {if(S[p]>=X){K=K+1;}  }
             if (K==M&&(P==-1||P>=PP)){P=PP;}
            }
*/

    } main {


        Scanner scan = new Scanner(System.in);
        String N = scan.next();
        String M[]=new String [6];

        for(int i=0;i<6;i++)
        { M[i]=N.substring(i,i+1);}
        if(M[2].equals(M[3])&&M[4].equals(M[5])){System.out.println("Yes");}
       else{System.out.println("No");}
//入力完了


/*
        for (int iii = 0; iii < (1 << N); iii++) {
                int PP=0;
                int S[] = new int[M];
                for (int j = 0; j < N; j++) {

                    if ((1 & iii >> j) == 1) {
                        for(int y=0;y<M;y++){S[y]=S[y]+A[j][y];}
                        PP=PP+C[j];
                    }

                }
                int K=0;
             for(int p=0;p<M;p++) {if(S[p]>=X){K=K+1;}  }
             if (K==M&&(P==-1||P>=PP)){P=PP;}
            }
*/

    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String N = scan.next(); N scan.next() scan.next scan String M[]=new String [6]; M new String [6] 6 for(int i=0;i<6;i++)
        { M[i]=N.substring(i,i+1);} int i=0; int i=0; i 0 i<6 i 6 i++ i++ i { M[i]=N.substring(i,i+1);} { M[i]=N.substring(i,i+1);} M[i]=N.substring(i,i+1) M[i] M i N.substring(i,i+1) N.substring N i i+1 i 1 if(M[2].equals(M[3])&&M[4].equals(M[5])){System.out.println("Yes");}
       else{System.out.println("No");} M[2].equals(M[3])&&M[4].equals(M[5]) M[2].equals(M[3]) M[2].equals M[2] M 2 M[3] M 3 M[4].equals(M[5]) M[4].equals M[4] M 4 M[5] M 5 {System.out.println("Yes");} System.out.println("Yes") System.out.println System.out System System.out "Yes" {System.out.println("No");} 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 scan = new Scanner(System.in);
        String N = scan.next();
        String M[]=new String [6];

        for(int i=0;i<6;i++)
        { M[i]=N.substring(i,i+1);}
        if(M[2].equals(M[3])&&M[4].equals(M[5])){System.out.println("Yes");}
       else{System.out.println("No");}
//入力完了


/*
        for (int iii = 0; iii < (1 << N); iii++) {
                int PP=0;
                int S[] = new int[M];
                for (int j = 0; j < N; j++) {

                    if ((1 & iii >> j) == 1) {
                        for(int y=0;y<M;y++){S[y]=S[y]+A[j][y];}
                        PP=PP+C[j];
                    }

                }
                int K=0;
             for(int p=0;p<M;p++) {if(S[p]>=X){K=K+1;}  }
             if (K==M&&(P==-1||P>=PP)){P=PP;}
            }
*/

    }

} public class Main {


    public static void main(String[] args) {


        Scanner scan = new Scanner(System.in);
        String N = scan.next();
        String M[]=new String [6];

        for(int i=0;i<6;i++)
        { M[i]=N.substring(i,i+1);}
        if(M[2].equals(M[3])&&M[4].equals(M[5])){System.out.println("Yes");}
       else{System.out.println("No");}
//入力完了


/*
        for (int iii = 0; iii < (1 << N); iii++) {
                int PP=0;
                int S[] = new int[M];
                for (int j = 0; j < N; j++) {

                    if ((1 & iii >> j) == 1) {
                        for(int y=0;y<M;y++){S[y]=S[y]+A[j][y];}
                        PP=PP+C[j];
                    }

                }
                int K=0;
             for(int p=0;p<M;p++) {if(S[p]>=X){K=K+1;}  }
             if (K==M&&(P==-1||P>=PP)){P=PP;}
            }
*/

    }

} Main
import java.util.Scanner;
public class Main {


    public static void main(String[] args) {


        Scanner scan = new Scanner(System.in);
        String N = scan.next();
        String M[]=new String [6];

        for(int i=0;i<6;i++)
        { M[i]=N.substring(i,i+1);}
        if(M[2].equals(M[3])&&M[4].equals(M[5])){System.out.println("Yes");}
       else{System.out.println("No");}
//入力完了


/*
        for (int iii = 0; iii < (1 << N); iii++) {
                int PP=0;
                int S[] = new int[M];
                for (int j = 0; j < N; j++) {

                    if ((1 & iii >> j) == 1) {
                        for(int y=0;y<M;y++){S[y]=S[y]+A[j][y];}
                        PP=PP+C[j];
                    }

                }
                int K=0;
             for(int p=0;p<M;p++) {if(S[p]>=X){K=K+1;}  }
             if (K==M&&(P==-1||P>=PP)){P=PP;}
            }
*/

    }

}

