#include <bits/stdc++.h>
using namespace std;
vector<char> m;
char c;
int main() {
  while (cin >> c && (c == '+' || c == '-')) {
    if (m.empty() || (*m.rbegin() != c)) {
      m.push_back(c);
    } else {
      m.pop_back();
    }
  }
  if (m.empty()) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
}
