import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String word = sc.next();
        char[] wordStr = word.toCharArray();
            if(wordStr[2] != wordStr[3]){
                System.out.println("No");
                return;
            }
            if (wordStr[4] != wordStr[5]){
                System.out.println("No");
                return;
            }
            System.out.println("Yes");
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String word = sc.next();
        char[] wordStr = word.toCharArray();
            if(wordStr[2] != wordStr[3]){
                System.out.println("No");
                return;
            }
            if (wordStr[4] != wordStr[5]){
                System.out.println("No");
                return;
            }
            System.out.println("Yes");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String word = sc.next();
        char[] wordStr = word.toCharArray();
            if(wordStr[2] != wordStr[3]){
                System.out.println("No");
                return;
            }
            if (wordStr[4] != wordStr[5]){
                System.out.println("No");
                return;
            }
            System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        String word = sc.next();
        char[] wordStr = word.toCharArray();
            if(wordStr[2] != wordStr[3]){
                System.out.println("No");
                return;
            }
            if (wordStr[4] != wordStr[5]){
                System.out.println("No");
                return;
            }
            System.out.println("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String word = sc.next(); word sc.next() sc.next sc char[] wordStr = word.toCharArray(); wordStr word.toCharArray() word.toCharArray word if(wordStr[2] != wordStr[3]){
                System.out.println("No");
                return;
            } wordStr[2] != wordStr[3] wordStr[2] wordStr 2 wordStr[3] wordStr 3 {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; if (wordStr[4] != wordStr[5]){
                System.out.println("No");
                return;
            } wordStr[4] != wordStr[5] wordStr[4] wordStr 4 wordStr[5] wordStr 5 {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String word = sc.next();
        char[] wordStr = word.toCharArray();
            if(wordStr[2] != wordStr[3]){
                System.out.println("No");
                return;
            }
            if (wordStr[4] != wordStr[5]){
                System.out.println("No");
                return;
            }
            System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String word = sc.next();
        char[] wordStr = word.toCharArray();
            if(wordStr[2] != wordStr[3]){
                System.out.println("No");
                return;
            }
            if (wordStr[4] != wordStr[5]){
                System.out.println("No");
                return;
            }
            System.out.println("Yes");
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String word = sc.next();
        char[] wordStr = word.toCharArray();
            if(wordStr[2] != wordStr[3]){
                System.out.println("No");
                return;
            }
            if (wordStr[4] != wordStr[5]){
                System.out.println("No");
                return;
            }
            System.out.println("Yes");
    }
}
