#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
ostream& operator<<(ostream& o, const pair<T1, T2>& p) {
  return o << "(" << p.first << "," << p.second << ")";
}
template <class T>
ostream& operator<<(ostream& o, const vector<T>& v) {
  o << "[";
  for (typename vector<T>::const_iterator i = v.begin(); i != v.end(); ++i) {
    if (i != v.begin()) o << ", ";
    o << (*i);
  }
  o << "]";
  return o;
}
template <class T>
ostream& operator<<(ostream& o, const set<T>& s) {
  o << "{";
  for (typename set<T>::const_iterator i = s.begin(); i != s.end(); ++i) {
    if (i != s.begin()) o << ", ";
    o << (*i);
  }
  o << "}";
  return o;
}
template <class K, class V>
ostream& operator<<(ostream& o, const map<K, V>& m) {
  o << "{";
  for (typename map<K, V>::const_iterator i = m.begin(); i != m.end(); ++i) {
    if (i != m.begin()) o << ", ";
    o << i->first << ":" << i->second;
  }
  o << "}";
  return o;
}
template <class T>
ostream& operator<<(ostream& o, const vector<vector<T> >& m) {
  o << "[\n";
  for (typename vector<vector<T> >::const_iterator i = m.begin(); i != m.end();
       ++i) {
    o << "  " << (*i);
    o << (i + 1 != m.end() ? ",\n" : "\n");
  }
  o << "]\n";
  return o;
}
string bitstr(int n, int d = 0) {
  string r;
  for (int i = 0; i < d || n > 0; ++i, n >>= 1) {
    r += (n & 1) ? "1" : "0";
  }
  reverse(r.begin(), r.end());
  return r;
}
int main() {
  string s;
  cin >> s;
  if (s.size() % 2 == 1) {
    cout << "No" << endl;
    return 0;
  }
  int tw = 0;
  for (int i = 0; i < (int)(s.size()); i++) {
    if ((i % 2 == 0 && s[i] == '+') || (i % 2 == 1 && s[i] == '-'))
      tw++;
    else
      tw--;
  }
  cout << (tw == 0 ? "Yes" : "No") << endl;
}
