#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<bool> vc;
  string c;
  cin >> c;
  for (string::iterator it = c.begin(); it != c.end(); ++it) {
    if (vc.empty() || (*--vc.end() != (*it == '+'))) {
      vc.push_back(*it == '+');
    } else {
      vc.pop_back();
    }
  }
  if (vc.empty())
    cout << "Yes";
  else
    cout << "No";
}
