#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  vector<char> z;
  for (int i = 0; i < n; ++i) {
    z.push_back(s[i]);
    int sz = z.size();
    if (z[sz - 1] == z[sz - 2]) {
      z.pop_back();
      z.pop_back();
    }
  }
  if (z.empty()) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
}
