s = input()                                                                                                                
                                                                                                                           
if s[2] == s[3] and s[4] == s[5]:                                                                                          
    print("Yes")                                                                                                           
else:                                                                                                                      
    print("No")                                                                                                            
abc160_a.py (END)
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           

### FIXED CODE ###

s = input()                                                                                                                
                                                                                                                           
if s[2] == s[3] and s[4] == s[5]:                                                                                          
    print("Yes")                                                                                                           
else:                                                                                                                      
    print("No")