#include <bits/stdc++.h>
using namespace std;
int main() {
  string ans;
  std::vector<char> v;
  string s;
  string s1 = "+";
  cin >> s;
  ans = "No";
  s = s.append(s1);
  s = s1.append(s);
  for (int i = 0; i < s.size(); i++) {
    if (v.size() == 0) {
      v.push_back(s[i]);
    } else {
      if (v.back() == s[i]) {
        v.pop_back();
      } else {
        v.push_back(s[i]);
      }
    }
  }
  if (v.size() == 0) {
    ans = "Yes";
  }
  cout << ans << endl;
  v.clear();
}
