import java.util.*;

class Main{
    Main(){
        Scanner SC = new Scanner(System.in);

        String S = SC.next();

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

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

        String S = SC.next();

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

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

        String S = SC.next();

        if(S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5)){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } Main {
        Scanner SC = new Scanner(System.in);

        String S = SC.next();

        if(S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5)){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } Scanner SC = new Scanner(System.in); SC new Scanner(System.in) String S = SC.next(); S SC.next() SC.next SC if(S.charAt(2) == S.charAt(3) && S.charAt(4) == S.charAt(5)){
            System.out.println("Yes");
        } else {
            System.out.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 {
            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" public static void main(String[] args){
        Main main = new Main();
    } main {
        Main main = new Main();
    } Main main = new Main(); main new Main() String[] args args
import java.util.*;

class Main{
    Main(){
        Scanner SC = new Scanner(System.in);

        String S = SC.next();

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

    public static void main(String[] args){
        Main main = new Main();
    }
}
