#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for (int i = (int)(n - 1); i >= 0; i--) #define all(x) (x).begin(), (x).end() #define sz(x) int(x.size()) #define get_unique(x) x.erase(unique(all(x)), x.end()); typedef long long ll; typedef complex Complex; const int INF = 1e9; const ll LINF = 1e18; const ll MOD = 998244353; template bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; } template bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; } template vector make_vec(size_t a) { return vector(a); } template auto make_vec(size_t a, Ts... ts) { return vector(ts...))>(a, make_vec(ts...)); } int main() { string s; getline(cin, s); for (char& c : s) if (c == ' ') c = '.'; vector v(26); int n = sz(s); for (int i = 1; i < n; i += 2) { if (s[i] != '.') { v[s[i] - 'a'] = 1; s[i] = '.'; } } for (char& c : s) if (c != '.' && v[c - 'a']) c = '.'; reverse(all(s)); while (sz(s) && s.back() == '.') s.pop_back(); if (sz(s) == 0) { cout << "NO" << endl; return 0; } reverse(all(s)); for (int i = 0; i < sz(s); i += 2) { if (s[i] == '.') { cout << "NO" << endl; return 0; } } cout << "Yes" << endl; }