
import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        if(S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5))
            os.println("Yes");
        else
            os.println("No");
    }
} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        if(S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5))
            os.println("Yes");
        else
            os.println("No");
    }
} Main public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    } main {
        solve(System.in, System.out);
    } solve(System.in, System.out) solve System.in System System.in System.out System System.out String[] args args static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        if(S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5))
            os.println("Yes");
        else
            os.println("No");
    } solve {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        if(S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5))
            os.println("Yes");
        else
            os.println("No");
    } Scanner scan = new Scanner(is); scan new Scanner(is) String S = scan.next(); S scan.next() scan.next scan if(S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5))
            os.println("Yes");
        else
            os.println("No"); S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5) S.charAt(2) == S.charAt(3) S.charAt(2) S.charAt S 2 S.charAt(3) S.charAt S 3 S.charAt(4) == S.charAt(5) S.charAt(4) S.charAt S 4 S.charAt(5) S.charAt S 5 os.println("Yes") os.println os "Yes" os.println("No") os.println os "No" InputStream is is PrintStream os os public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        if(S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5))
            os.println("Yes");
        else
            os.println("No");
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        if(S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5))
            os.println("Yes");
        else
            os.println("No");
    }
} Main

import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        if(S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5))
            os.println("Yes");
        else
            os.println("No");
    }
}