
import java.util.*;

class Main {

    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);

        char[] ss = s.next().toCharArray();

        if (ss[2] != ss[3]) {
            System.out.println("No");
            return;
        }
        if (ss[4] != ss[5]) {
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }

} import java.util.*; util.* java class Main {

    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);

        char[] ss = s.next().toCharArray();

        if (ss[2] != ss[3]) {
            System.out.println("No");
            return;
        }
        if (ss[4] != ss[5]) {
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }

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

        char[] ss = s.next().toCharArray();

        if (ss[2] != ss[3]) {
            System.out.println("No");
            return;
        }
        if (ss[4] != ss[5]) {
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    } main {
        Scanner s = new Scanner(System.in);

        char[] ss = s.next().toCharArray();

        if (ss[2] != ss[3]) {
            System.out.println("No");
            return;
        }
        if (ss[4] != ss[5]) {
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) char[] ss = s.next().toCharArray(); ss s.next().toCharArray() s.next().toCharArray s.next() s.next s if (ss[2] != ss[3]) {
            System.out.println("No");
            return;
        } ss[2] != ss[3] ss[2] ss 2 ss[3] ss 3 {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; if (ss[4] != ss[5]) {
            System.out.println("No");
            return;
        } ss[4] != ss[5] ss[4] ss 4 ss[5] ss 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

import java.util.*;

class Main {

    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);

        char[] ss = s.next().toCharArray();

        if (ss[2] != ss[3]) {
            System.out.println("No");
            return;
        }
        if (ss[4] != ss[5]) {
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }

}
