#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string secuence;
  cin >> secuence;
  vector<char> state;
  for (long p = 0; p < secuence.size(); p++) {
    if (!state.empty() && state.back() == secuence[p]) {
      state.pop_back();
    } else {
      state.push_back(secuence[p]);
    }
  }
  puts(state.empty() ? "Yes" : "No");
  return 0;
  return 0;
}
