#include <bits/stdc++.h>
using namespace std;
int main() {
  string a;
  vector<char> b;
  cin >> a;
  for (int i = 0; i < a.length(); i++) {
    if (b.size() == 0 || b.back() != a[i]) {
      b.push_back(a[i]);
      continue;
    }
    b.pop_back();
  }
  if (b.empty()) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
