import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        String coffee;
        Scanner scan = new Scanner(System.in);


        coffee = scan.nextLine();

        if(coffee.length() == 6 && method(coffee)) {
            if(coffee.charAt(2) == coffee.charAt(3) &&
               coffee.charAt(4) == coffee.charAt(5)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        } else {
            System.out.println("No");
        }
    }

    public static boolean method(String s) {
        char[] alpha = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};

        a:
        for(int i = 0; i < s.length(); i++) {
            for(int j = 0; j < alpha.length; j++) {
                if(s.charAt(i) == alpha[j]) {
                    continue a;
                }
            }
            return false;
        }

        return true;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        String coffee;
        Scanner scan = new Scanner(System.in);


        coffee = scan.nextLine();

        if(coffee.length() == 6 && method(coffee)) {
            if(coffee.charAt(2) == coffee.charAt(3) &&
               coffee.charAt(4) == coffee.charAt(5)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        } else {
            System.out.println("No");
        }
    }

    public static boolean method(String s) {
        char[] alpha = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};

        a:
        for(int i = 0; i < s.length(); i++) {
            for(int j = 0; j < alpha.length; j++) {
                if(s.charAt(i) == alpha[j]) {
                    continue a;
                }
            }
            return false;
        }

        return true;
    }
} Main public static void main(String[] args) {
        String coffee;
        Scanner scan = new Scanner(System.in);


        coffee = scan.nextLine();

        if(coffee.length() == 6 && method(coffee)) {
            if(coffee.charAt(2) == coffee.charAt(3) &&
               coffee.charAt(4) == coffee.charAt(5)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        } else {
            System.out.println("No");
        }
    } main {
        String coffee;
        Scanner scan = new Scanner(System.in);


        coffee = scan.nextLine();

        if(coffee.length() == 6 && method(coffee)) {
            if(coffee.charAt(2) == coffee.charAt(3) &&
               coffee.charAt(4) == coffee.charAt(5)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        } else {
            System.out.println("No");
        }
    } String coffee; coffee Scanner scan = new Scanner(System.in); scan new Scanner(System.in) coffee = scan.nextLine() coffee scan.nextLine() scan.nextLine scan if(coffee.length() == 6 && method(coffee)) {
            if(coffee.charAt(2) == coffee.charAt(3) &&
               coffee.charAt(4) == coffee.charAt(5)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        } else {
            System.out.println("No");
        } coffee.length() == 6 && method(coffee) coffee.length() == 6 coffee.length() coffee.length coffee 6 method(coffee) method coffee {
            if(coffee.charAt(2) == coffee.charAt(3) &&
               coffee.charAt(4) == coffee.charAt(5)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        } if(coffee.charAt(2) == coffee.charAt(3) &&
               coffee.charAt(4) == coffee.charAt(5)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            } coffee.charAt(2) == coffee.charAt(3) &&
               coffee.charAt(4) == coffee.charAt(5) coffee.charAt(2) == coffee.charAt(3) coffee.charAt(2) coffee.charAt coffee 2 coffee.charAt(3) coffee.charAt coffee 3 coffee.charAt(4) == coffee.charAt(5) coffee.charAt(4) coffee.charAt coffee 4 coffee.charAt(5) coffee.charAt coffee 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" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" String[] args args public static boolean method(String s) {
        char[] alpha = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};

        a:
        for(int i = 0; i < s.length(); i++) {
            for(int j = 0; j < alpha.length; j++) {
                if(s.charAt(i) == alpha[j]) {
                    continue a;
                }
            }
            return false;
        }

        return true;
    } method {
        char[] alpha = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};

        a:
        for(int i = 0; i < s.length(); i++) {
            for(int j = 0; j < alpha.length; j++) {
                if(s.charAt(i) == alpha[j]) {
                    continue a;
                }
            }
            return false;
        }

        return true;
    } char[] alpha = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; alpha {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'} 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z' return true; true String s s public class Main {
    public static void main(String[] args) {
        String coffee;
        Scanner scan = new Scanner(System.in);


        coffee = scan.nextLine();

        if(coffee.length() == 6 && method(coffee)) {
            if(coffee.charAt(2) == coffee.charAt(3) &&
               coffee.charAt(4) == coffee.charAt(5)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        } else {
            System.out.println("No");
        }
    }

    public static boolean method(String s) {
        char[] alpha = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};

        a:
        for(int i = 0; i < s.length(); i++) {
            for(int j = 0; j < alpha.length; j++) {
                if(s.charAt(i) == alpha[j]) {
                    continue a;
                }
            }
            return false;
        }

        return true;
    }
} public class Main {
    public static void main(String[] args) {
        String coffee;
        Scanner scan = new Scanner(System.in);


        coffee = scan.nextLine();

        if(coffee.length() == 6 && method(coffee)) {
            if(coffee.charAt(2) == coffee.charAt(3) &&
               coffee.charAt(4) == coffee.charAt(5)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        } else {
            System.out.println("No");
        }
    }

    public static boolean method(String s) {
        char[] alpha = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};

        a:
        for(int i = 0; i < s.length(); i++) {
            for(int j = 0; j < alpha.length; j++) {
                if(s.charAt(i) == alpha[j]) {
                    continue a;
                }
            }
            return false;
        }

        return true;
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        String coffee;
        Scanner scan = new Scanner(System.in);


        coffee = scan.nextLine();

        if(coffee.length() == 6 && method(coffee)) {
            if(coffee.charAt(2) == coffee.charAt(3) &&
               coffee.charAt(4) == coffee.charAt(5)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        } else {
            System.out.println("No");
        }
    }

    public static boolean method(String s) {
        char[] alpha = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};

        a:
        for(int i = 0; i < s.length(); i++) {
            for(int j = 0; j < alpha.length; j++) {
                if(s.charAt(i) == alpha[j]) {
                    continue a;
                }
            }
            return false;
        }

        return true;
    }
}