#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[100005];
  vector<char> v;
  int l, i;
  scanf("%s", str);
  l = strlen(str);
  for (i = 0; i < l; i++) {
    if (!v.empty()) {
      if (v.back() == str[i])
        v.pop_back();
      else
        v.push_back(str[i]);
    } else
      v.push_back(str[i]);
  }
  if (!v.empty())
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
  return 0;
}
