/*********************************************************************************************
    "Never Forget What you are,the rest of the world will not.Wear it like armour and it can never be used to hurt you"-- Tyrion Lannister
																														
@Author: Nikunj Joshi
@Date:   2020-03-28 17:23:34
**********************************************************************************************/
#if __has_include("debug.h")
    #include "debug.h"
#else  

#include <bits/stdc++.h>
using namespace std;
#define track  1;
#define d(x) 2;
#define printa(w,y) 372001;
#define tr1(x) 3;
#define tr2(x,y) 5;
#define tr3(x,y,z) 7;
#define tr4(x,y,z,w) 11;
#endif

#define ll long long int
#define ui unsigned long long
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define mem(a,x) memset(a,x,sizeof(a))
#define prec(a,n) cout<<fixed<<setprecision(n)<<a
#define endl "\n"      
#define gs 200005

#define f(i,n) 	  for(i=0;i<n;i++)
#define fo(i,k,n) for(i=k;i<n;i++)
#define fr(i,n,m) for(i=n-1;i>=m;i--)

// stl templates..................//
typedef vector<ll>  vi;
typedef vector<pair<ll,ll> >  vii;
typedef pair<ll,ll>  pi;
typedef map<ll,ll> mii;
typedef map<string,ll> msi;
typedef map<ll,string> mis;
typedef pair<ll,ll> pi;

#define pb push_back
#define eb emplace_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define present(c,x) ((c).find(x) != (c).end())//for set and map 
#define vpresent(c,x) (find(all(c),x) != (c).end()) //for vector
#define mp make_pair
#define ff first
#define ss second
#define bs(v,n)     binary_search(all((v)),(n))
#define lb(v,n)     lower_bound(all((v)),(n))
#define ub(v,n)     upper_bound(all((v)),(n))

//big data...

#define mul(a,b) ((a%MOD)*(b%MOD))%MOD
#define add(a,b) ((a%MOD)+(b%MOD))%MOD
#define sub(a,b) (((a) % MOD)-((b) % MOD) + MOD) % MOD
#define div(a,b) mul(a,modinverse(b))



//maths...

#define MOD 1000000007
const double PI = 2*acos(0.0);
#define gcd(a,b)            __gcd((a),(b))
#define lcm(a,b)            ((a*b)/gcd(a,b))
#define INF                 LLONG_MAX
inline ll pow2(int n){return (1LL<<n);}
inline int digits(ll x){return (floor(log10(x))+1);}
inline bool isPowerOfTwo(ll x){return (x&&(!(x&(x-1))));}
ll nCr(int n, int r,ll mod){long long p=1,k=1;if(n-r<r)r=n-r;if(r){while(r){
p=mul(p,n);k=mul(k,r);long long m=gcd(p,k);p/=m;k/=m;n--;r--;}}else p=1;return p;}

// for i/o

#define cina(a,n) \
    f(i,n)\
    cin>>a[i];

template<typename TAIL>inline void inp(TAIL& T){cin>>T;}
template<typename HEAD,typename... TAIL>inline void inp(HEAD &H,TAIL&... T){cin>>H;inp(T...);}
template<typename T,typename U>inline istream& operator >>(istream& in,pair<T,U> &wa){in>>wa.ff>>wa.ss;return in;}
template<typename T>inline istream& operator >>(istream& in,vector<T> &wa){for(auto &x : wa)in>>x;return in;}

// for printing fast
#define print(con)     for(auto &i:con) cout<<i<<" "; cout<<endl;
#define printp(con)    for(auto &i:con) cout<<i.ff<<" "<<i.ss<<endl;

// Function declaration
void solve();

int main()
{
    #ifdef DEBUG
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
    #endif 

    fast
    
    ll t = 1;
	// cin>>t;
	
	while(t--)
	    solve();
	return 0;  
}

void solve()
{
	ll i,j,ans=0,cnt=0;

	bool flag=0;

	string s;

	cin>>s;

	if(s.length()==6&&s[2]==s[3]&&(s[4]==s[5]))
	{
		cout<<"Yes"<<endl;
	}
	else
	{
		cout<<"No"<<endl;
	}

}




Measured memory_bytes: 256