import java.util.ArrayList;
import java.util.Scanner;

public class Main{
    
 
    public static void main(String[] args)  {
        new Main().solve();
    }

    void solve(){
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        


        ArrayList<String> list = new ArrayList<String>();
        for(int i =0; i<a.length();i++){
            String b = String.valueOf(a.charAt(i));
            list.add(b);
        }
        

        boolean threefour = false;

        if(list.get(2).equals(list.get(3))){
            threefour = true;
        }

        boolean fivesix = false;

        if(list.get(4).equals(list.get(5))){
            fivesix = true;
        }

        sc.close();

        if(threefour && fivesix){
            System.out.println("Yes");

        }
        else{
            System.out.println("No");
        }




    }
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main{
    
 
    public static void main(String[] args)  {
        new Main().solve();
    }

    void solve(){
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        


        ArrayList<String> list = new ArrayList<String>();
        for(int i =0; i<a.length();i++){
            String b = String.valueOf(a.charAt(i));
            list.add(b);
        }
        

        boolean threefour = false;

        if(list.get(2).equals(list.get(3))){
            threefour = true;
        }

        boolean fivesix = false;

        if(list.get(4).equals(list.get(5))){
            fivesix = true;
        }

        sc.close();

        if(threefour && fivesix){
            System.out.println("Yes");

        }
        else{
            System.out.println("No");
        }




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


        ArrayList<String> list = new ArrayList<String>();
        for(int i =0; i<a.length();i++){
            String b = String.valueOf(a.charAt(i));
            list.add(b);
        }
        

        boolean threefour = false;

        if(list.get(2).equals(list.get(3))){
            threefour = true;
        }

        boolean fivesix = false;

        if(list.get(4).equals(list.get(5))){
            fivesix = true;
        }

        sc.close();

        if(threefour && fivesix){
            System.out.println("Yes");

        }
        else{
            System.out.println("No");
        }




    } solve {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        


        ArrayList<String> list = new ArrayList<String>();
        for(int i =0; i<a.length();i++){
            String b = String.valueOf(a.charAt(i));
            list.add(b);
        }
        

        boolean threefour = false;

        if(list.get(2).equals(list.get(3))){
            threefour = true;
        }

        boolean fivesix = false;

        if(list.get(4).equals(list.get(5))){
            fivesix = true;
        }

        sc.close();

        if(threefour && fivesix){
            System.out.println("Yes");

        }
        else{
            System.out.println("No");
        }




    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() for(int i =0; i<a.length();i++){
            String b = String.valueOf(a.charAt(i));
            list.add(b);
        } int i =0; int i =0; i 0 i<a.length() i a.length() a.length a i++ i++ i {
            String b = String.valueOf(a.charAt(i));
            list.add(b);
        } {
            String b = String.valueOf(a.charAt(i));
            list.add(b);
        } String b = String.valueOf(a.charAt(i)); b String.valueOf(a.charAt(i)) String.valueOf String a.charAt(i) a.charAt a i list.add(b) list.add list b boolean threefour = false; threefour false if(list.get(2).equals(list.get(3))){
            threefour = true;
        } list.get(2).equals(list.get(3)) list.get(2).equals list.get(2) list.get list 2 list.get(3) list.get list 3 {
            threefour = true;
        } threefour = true threefour true boolean fivesix = false; fivesix false if(list.get(4).equals(list.get(5))){
            fivesix = true;
        } list.get(4).equals(list.get(5)) list.get(4).equals list.get(4) list.get list 4 list.get(5) list.get list 5 {
            fivesix = true;
        } fivesix = true fivesix true sc.close() sc.close sc if(threefour && fivesix){
            System.out.println("Yes");

        }
        else{
            System.out.println("No");
        } threefour && fivesix threefour fivesix {
            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 class Main{
    
 
    public static void main(String[] args)  {
        new Main().solve();
    }

    void solve(){
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        


        ArrayList<String> list = new ArrayList<String>();
        for(int i =0; i<a.length();i++){
            String b = String.valueOf(a.charAt(i));
            list.add(b);
        }
        

        boolean threefour = false;

        if(list.get(2).equals(list.get(3))){
            threefour = true;
        }

        boolean fivesix = false;

        if(list.get(4).equals(list.get(5))){
            fivesix = true;
        }

        sc.close();

        if(threefour && fivesix){
            System.out.println("Yes");

        }
        else{
            System.out.println("No");
        }




    }
} public class Main{
    
 
    public static void main(String[] args)  {
        new Main().solve();
    }

    void solve(){
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        


        ArrayList<String> list = new ArrayList<String>();
        for(int i =0; i<a.length();i++){
            String b = String.valueOf(a.charAt(i));
            list.add(b);
        }
        

        boolean threefour = false;

        if(list.get(2).equals(list.get(3))){
            threefour = true;
        }

        boolean fivesix = false;

        if(list.get(4).equals(list.get(5))){
            fivesix = true;
        }

        sc.close();

        if(threefour && fivesix){
            System.out.println("Yes");

        }
        else{
            System.out.println("No");
        }




    }
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main{
    
 
    public static void main(String[] args)  {
        new Main().solve();
    }

    void solve(){
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        


        ArrayList<String> list = new ArrayList<String>();
        for(int i =0; i<a.length();i++){
            String b = String.valueOf(a.charAt(i));
            list.add(b);
        }
        

        boolean threefour = false;

        if(list.get(2).equals(list.get(3))){
            threefour = true;
        }

        boolean fivesix = false;

        if(list.get(4).equals(list.get(5))){
            fivesix = true;
        }

        sc.close();

        if(threefour && fivesix){
            System.out.println("Yes");

        }
        else{
            System.out.println("No");
        }




    }
}