#include <iostream>

                    #include <bits/stdc++.h>
                    #include<string>
                    #include<string.h>
                    #define ll long long
                    #define ll long long
                    #define ld long double
                    #define ctoi(x) x-'0'
                    #define pshb(a) cin >> x;a.push_back(x)
                    #define fr(i,n) for(ll i=0;i<n;i++)
                    #define alph C
                    #define alph1 "abcdefghijklmnopqrstuvwxyz"
                    #include <vector>#include <bits/stdc++.h>
                    #include<string>
                    #include<string.h>
                    #define ll long long
                    #define ll long long
                    #define ld long double
                    #define ctoi(x) x-'0'
                    #define pb(x) cin>>x; a.push_back(x)
                    #define srt() sort(a.begin(),a.end())
                    #define fr(i,n) for(ll i=0;i<n;i++)
                    #define alph "abcdefghijklmnopqrstuvwxyz"
                    #define alph1 "abcdefghijklmnopqrstuvwxyz"
                    #include <vector>
                    #include<math.h>
                    #define WUBBAxxLUBAxxDUBxxDUB int main
                    #define salamo3lekooooom ios::sync_with_stdio(false)
                    using namespace std;
                    # define M_PI           3.14159265358979323846
                    bool sortbysec(const pair<int,int> &a,
                                   const pair<int,int> &b)
                    {
                        return (a.second < b.second);
                    }
                    #define LIMIT 100000009
                    long long i, j;
                    long long prime_flag[100005];
                    void calculate_prime_flag()
                    {
                        prime_flag[0] = prime_flag[1] = 1;
                        for(i=2; i<sqrt(LIMIT); i++)
                        {
                            if (prime_flag[i]==0)
                            {
                                for(j=i*i; j<sqrt(LIMIT); j+=i)
                                {
                                    prime_flag[j] = 1;
                                }
                            }
                        }
                    }




                    int LPS(char *str)
                    {
                        int n=strlen(str);
                        int i,j,cl;
                        int l[n][n];
                        for(i=0; i<n; i++)
                            l[i][i]=1;
                        for(cl=2; cl<=n; cl++)
                        {
                            for(i=0; i<n-cl+1; i++)
                            {
                                j=i+cl-1;
                                if(str[i]==str[j]&&cl==2)
                                    l[i][j]=2;
                                else if (str[i]==str[j])
                                    l[i][j]=l[i+1][j-1]+2;
                                else
                                    l[i][j]=max(l[i][j-1],l[i+1][j]);


                            }
                        }
                        return l[0][n-1];


                    }
                    int gcd(int a, int b)
                    {
                        if (a == 0)
                            return b;
                        return gcd(b % a, a);
                    }


                    int findGCD(int arr[], int n)
                    {
                        int result = arr[0];
                        for (int i = 1; i < n; i++)
                            result = gcd(arr[i], result);

                        return result;
                    }





                /////3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa




            WUBBAxxLUBAxxDUBxxDUB()
        {
            salamo3lekooooom;
                string s;
                cin>>s;
                if(s[2]==s[3]&&s[4]==s[5])
                    cout<<"Yes"<<endl;
                    else 
                        cout<<"No"<<endl;
                
        return 0;

        }


Measured memory_bytes: 256