import java.util.*;

class Main {
    public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        do_(inp);
        inp.close();
    }
    public static void do_(Scanner inp) {
        char s[] = inp.next().toCharArray();
        if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No");
    }
} import java.util.*; util.* java class Main {
    public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        do_(inp);
        inp.close();
    }
    public static void do_(Scanner inp) {
        char s[] = inp.next().toCharArray();
        if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No");
    }
} Main public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        do_(inp);
        inp.close();
    } main {
        Scanner inp = new Scanner(System.in);
        do_(inp);
        inp.close();
    } Scanner inp = new Scanner(System.in); inp new Scanner(System.in) do_(inp) do_ inp inp.close() inp.close inp String args[] args public static void do_(Scanner inp) {
        char s[] = inp.next().toCharArray();
        if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No");
    } do_ {
        char s[] = inp.next().toCharArray();
        if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No");
    } char s[] = inp.next().toCharArray(); s inp.next().toCharArray() inp.next().toCharArray inp.next() inp.next inp if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No"); s[2] == s[3] && s[4] == s[5] s[2] == s[3] s[2] s 2 s[3] s 3 s[4] == s[5] s[4] s 4 s[5] s 5 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" Scanner inp inp
import java.util.*;

class Main {
    public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        do_(inp);
        inp.close();
    }
    public static void do_(Scanner inp) {
        char s[] = inp.next().toCharArray();
        if (s[2] == s[3] && s[4] == s[5]) System.out.println("Yes");
        else System.out.println("No");
    }
}
