#ifdef _LOCAL
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;

string solve(ll n) {
    if(n == 0)
        return "Yes";

    while(n % 10ll == 0ll)
        n /= 10ll;

    string s = to_string(n);
    bool ok = true;
    int size = (int)s.size();
    for(int i = 0; i < size / 2; i++) {
        if(s[i] != s[size - 1 - i]) {
            ok = false;
            break;
        }
    }
    return ok ? "Yes" : "No";
}

#ifndef _LOCAL
int main() {
    ll n;
    cin >> n;
    cout << solve(n) << endl;
    return 0;
}
#endif
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,i,k,t,c=0,ss=0,ev=0,od=0;
    string s;
    cin>>s;
    for(int i=0;i<s.size();i++){
        if(i%2 ==0 && s[i]>='a' && s[i]<='z')c++;
        else if(i%2!=0 && s[i]>='A' && s[i]<='Z')ss++;

        if(i%2==0)ev++;
        else od++;
    }
    //cout<<ev<<" "<<od<<endl<<c<<" "<<ss<<endl;
    if(c==ev && ss==od)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;


}

