#include<iostream>
#include<vector>

using namespace std;

int main(){
    string s;
    cin >> s;

    int a =1;

    if(s[2]!=s[3]){a=0;}
    if(s[4]!=s[5]){a=0;}

    if(a==0){cout << "No"<< endl;}
    if(a==1){cout << "Yes"<< endl;}

}
