import java.util.Scanner;
public class Main{
    public static Scanner scn=new Scanner (System.in);
    public static void main(String []args){
        ans();
    }
    public static void ans(){
        String str=scn.nextLine();
        if(str.length()<6)
        System.out.print("No");
        else{
            char ch1=str.charAt(2);
            char ch2=str.charAt(3);
            char ch3=str.charAt(4);
            char ch4=str.charAt(5);
            if(ch1==ch2 && ch3==ch4)
            System.out.print("Yes");
            else 
            System.out.print("No");
        }
    }
}
   import java.util.Scanner; Scanner java.util public class Main{
    public static Scanner scn=new Scanner (System.in);
    public static void main(String []args){
        ans();
    }
    public static void ans(){
        String str=scn.nextLine();
        if(str.length()<6)
        System.out.print("No");
        else{
            char ch1=str.charAt(2);
            char ch2=str.charAt(3);
            char ch3=str.charAt(4);
            char ch4=str.charAt(5);
            if(ch1==ch2 && ch3==ch4)
            System.out.print("Yes");
            else 
            System.out.print("No");
        }
    }
} Main public static Scanner scn=new Scanner (System.in); scn new Scanner (System.in) public static void main(String []args){
        ans();
    } main {
        ans();
    } ans() ans String []args args public static void ans(){
        String str=scn.nextLine();
        if(str.length()<6)
        System.out.print("No");
        else{
            char ch1=str.charAt(2);
            char ch2=str.charAt(3);
            char ch3=str.charAt(4);
            char ch4=str.charAt(5);
            if(ch1==ch2 && ch3==ch4)
            System.out.print("Yes");
            else 
            System.out.print("No");
        }
    } ans {
        String str=scn.nextLine();
        if(str.length()<6)
        System.out.print("No");
        else{
            char ch1=str.charAt(2);
            char ch2=str.charAt(3);
            char ch3=str.charAt(4);
            char ch4=str.charAt(5);
            if(ch1==ch2 && ch3==ch4)
            System.out.print("Yes");
            else 
            System.out.print("No");
        }
    } String str=scn.nextLine(); str scn.nextLine() scn.nextLine scn if(str.length()<6)
        System.out.print("No");
        else{
            char ch1=str.charAt(2);
            char ch2=str.charAt(3);
            char ch3=str.charAt(4);
            char ch4=str.charAt(5);
            if(ch1==ch2 && ch3==ch4)
            System.out.print("Yes");
            else 
            System.out.print("No");
        } str.length()<6 str.length() str.length str 6 System.out.print("No") System.out.print System.out System System.out "No" {
            char ch1=str.charAt(2);
            char ch2=str.charAt(3);
            char ch3=str.charAt(4);
            char ch4=str.charAt(5);
            if(ch1==ch2 && ch3==ch4)
            System.out.print("Yes");
            else 
            System.out.print("No");
        } char ch1=str.charAt(2); ch1 str.charAt(2) str.charAt str 2 char ch2=str.charAt(3); ch2 str.charAt(3) str.charAt str 3 char ch3=str.charAt(4); ch3 str.charAt(4) str.charAt str 4 char ch4=str.charAt(5); ch4 str.charAt(5) str.charAt str 5 if(ch1==ch2 && ch3==ch4)
            System.out.print("Yes");
            else 
            System.out.print("No"); ch1==ch2 && ch3==ch4 ch1==ch2 ch1 ch2 ch3==ch4 ch3 ch4 System.out.print("Yes") System.out.print System.out System System.out "Yes" System.out.print("No") System.out.print System.out System System.out "No" public class Main{
    public static Scanner scn=new Scanner (System.in);
    public static void main(String []args){
        ans();
    }
    public static void ans(){
        String str=scn.nextLine();
        if(str.length()<6)
        System.out.print("No");
        else{
            char ch1=str.charAt(2);
            char ch2=str.charAt(3);
            char ch3=str.charAt(4);
            char ch4=str.charAt(5);
            if(ch1==ch2 && ch3==ch4)
            System.out.print("Yes");
            else 
            System.out.print("No");
        }
    }
} public class Main{
    public static Scanner scn=new Scanner (System.in);
    public static void main(String []args){
        ans();
    }
    public static void ans(){
        String str=scn.nextLine();
        if(str.length()<6)
        System.out.print("No");
        else{
            char ch1=str.charAt(2);
            char ch2=str.charAt(3);
            char ch3=str.charAt(4);
            char ch4=str.charAt(5);
            if(ch1==ch2 && ch3==ch4)
            System.out.print("Yes");
            else 
            System.out.print("No");
        }
    }
} Main
import java.util.Scanner;
public class Main{
    public static Scanner scn=new Scanner (System.in);
    public static void main(String []args){
        ans();
    }
    public static void ans(){
        String str=scn.nextLine();
        if(str.length()<6)
        System.out.print("No");
        else{
            char ch1=str.charAt(2);
            char ch2=str.charAt(3);
            char ch3=str.charAt(4);
            char ch4=str.charAt(5);
            if(ch1==ch2 && ch3==ch4)
            System.out.print("Yes");
            else 
            System.out.print("No");
        }
    }
}
  