import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] strChar = new char[str.length()];
        for(int i = 0; i<str.length(); i++){
            strChar[i] = str.charAt(i);
        }

        boolean judge = false;
        if(strChar[2] == strChar[3]){
            if(strChar[4] == strChar[5]){
                judge = true;
            }
        }
        System.out.println(judge ? "Yes" : "No");
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] strChar = new char[str.length()];
        for(int i = 0; i<str.length(); i++){
            strChar[i] = str.charAt(i);
        }

        boolean judge = false;
        if(strChar[2] == strChar[3]){
            if(strChar[4] == strChar[5]){
                judge = true;
            }
        }
        System.out.println(judge ? "Yes" : "No");
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] strChar = new char[str.length()];
        for(int i = 0; i<str.length(); i++){
            strChar[i] = str.charAt(i);
        }

        boolean judge = false;
        if(strChar[2] == strChar[3]){
            if(strChar[4] == strChar[5]){
                judge = true;
            }
        }
        System.out.println(judge ? "Yes" : "No");
    } main {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] strChar = new char[str.length()];
        for(int i = 0; i<str.length(); i++){
            strChar[i] = str.charAt(i);
        }

        boolean judge = false;
        if(strChar[2] == strChar[3]){
            if(strChar[4] == strChar[5]){
                judge = true;
            }
        }
        System.out.println(judge ? "Yes" : "No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc char[] strChar = new char[str.length()]; strChar new char[str.length()] str.length() str.length str for(int i = 0; i<str.length(); i++){
            strChar[i] = str.charAt(i);
        } int i = 0; int i = 0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
            strChar[i] = str.charAt(i);
        } {
            strChar[i] = str.charAt(i);
        } strChar[i] = str.charAt(i) strChar[i] strChar i str.charAt(i) str.charAt str i boolean judge = false; judge false if(strChar[2] == strChar[3]){
            if(strChar[4] == strChar[5]){
                judge = true;
            }
        } strChar[2] == strChar[3] strChar[2] strChar 2 strChar[3] strChar 3 {
            if(strChar[4] == strChar[5]){
                judge = true;
            }
        } if(strChar[4] == strChar[5]){
                judge = true;
            } strChar[4] == strChar[5] strChar[4] strChar 4 strChar[5] strChar 5 {
                judge = true;
            } judge = true judge true System.out.println(judge ? "Yes" : "No") System.out.println System.out System System.out judge ? "Yes" : "No" judge "Yes" "No" String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] strChar = new char[str.length()];
        for(int i = 0; i<str.length(); i++){
            strChar[i] = str.charAt(i);
        }

        boolean judge = false;
        if(strChar[2] == strChar[3]){
            if(strChar[4] == strChar[5]){
                judge = true;
            }
        }
        System.out.println(judge ? "Yes" : "No");
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] strChar = new char[str.length()];
        for(int i = 0; i<str.length(); i++){
            strChar[i] = str.charAt(i);
        }

        boolean judge = false;
        if(strChar[2] == strChar[3]){
            if(strChar[4] == strChar[5]){
                judge = true;
            }
        }
        System.out.println(judge ? "Yes" : "No");
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] strChar = new char[str.length()];
        for(int i = 0; i<str.length(); i++){
            strChar[i] = str.charAt(i);
        }

        boolean judge = false;
        if(strChar[2] == strChar[3]){
            if(strChar[4] == strChar[5]){
                judge = true;
            }
        }
        System.out.println(judge ? "Yes" : "No");
    }
}