import java.util.*;
import java.io.*;
import java.lang.*;
public class Main{

     public static void main(String []args) throws Exception {
        BufferedReader inp = new BufferedReader(new InputStreamReader(System.in));
        String s = inp.readLine().trim();
        int len = s.length();
        if(len==0 || len>6){
            System.out.println("No");
        }else{
            if(s.charAt(2) == s.charAt(3)  && s.charAt(4)==s.charAt(5)){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
        }
        
        
     }
} import java.util.*; util.* java import java.io.*; io.* java import java.lang.*; lang.* java public class Main{

     public static void main(String []args) throws Exception {
        BufferedReader inp = new BufferedReader(new InputStreamReader(System.in));
        String s = inp.readLine().trim();
        int len = s.length();
        if(len==0 || len>6){
            System.out.println("No");
        }else{
            if(s.charAt(2) == s.charAt(3)  && s.charAt(4)==s.charAt(5)){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
        }
        
        
     }
} Main public static void main(String []args) throws Exception {
        BufferedReader inp = new BufferedReader(new InputStreamReader(System.in));
        String s = inp.readLine().trim();
        int len = s.length();
        if(len==0 || len>6){
            System.out.println("No");
        }else{
            if(s.charAt(2) == s.charAt(3)  && s.charAt(4)==s.charAt(5)){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
        }
        
        
     } main {
        BufferedReader inp = new BufferedReader(new InputStreamReader(System.in));
        String s = inp.readLine().trim();
        int len = s.length();
        if(len==0 || len>6){
            System.out.println("No");
        }else{
            if(s.charAt(2) == s.charAt(3)  && s.charAt(4)==s.charAt(5)){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
        }
        
        
     } BufferedReader inp = new BufferedReader(new InputStreamReader(System.in)); inp new BufferedReader(new InputStreamReader(System.in)) String s = inp.readLine().trim(); s inp.readLine().trim() inp.readLine().trim inp.readLine() inp.readLine inp int len = s.length(); len s.length() s.length s if(len==0 || len>6){
            System.out.println("No");
        }else{
            if(s.charAt(2) == s.charAt(3)  && s.charAt(4)==s.charAt(5)){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
        } len==0 || len>6 len==0 len 0 len>6 len 6 {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" {
            if(s.charAt(2) == s.charAt(3)  && s.charAt(4)==s.charAt(5)){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
        } 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" String []args args public class Main{

     public static void main(String []args) throws Exception {
        BufferedReader inp = new BufferedReader(new InputStreamReader(System.in));
        String s = inp.readLine().trim();
        int len = s.length();
        if(len==0 || len>6){
            System.out.println("No");
        }else{
            if(s.charAt(2) == s.charAt(3)  && s.charAt(4)==s.charAt(5)){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
        }
        
        
     }
} public class Main{

     public static void main(String []args) throws Exception {
        BufferedReader inp = new BufferedReader(new InputStreamReader(System.in));
        String s = inp.readLine().trim();
        int len = s.length();
        if(len==0 || len>6){
            System.out.println("No");
        }else{
            if(s.charAt(2) == s.charAt(3)  && s.charAt(4)==s.charAt(5)){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
        }
        
        
     }
} Main
import java.util.*;
import java.io.*;
import java.lang.*;
public class Main{

     public static void main(String []args) throws Exception {
        BufferedReader inp = new BufferedReader(new InputStreamReader(System.in));
        String s = inp.readLine().trim();
        int len = s.length();
        if(len==0 || len>6){
            System.out.println("No");
        }else{
            if(s.charAt(2) == s.charAt(3)  && s.charAt(4)==s.charAt(5)){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
        }
        
        
     }
}