#include <bits/stdc++.h>
using namespace std;
int main() {
  stack<char> signs;
  int num;
  string t;
  cin >> t;
  num = t.size();
  for (int i = 0; i < num; i++) {
    char tmp = t[i];
    if (signs.size() != 0) {
      if (signs.top() == tmp)
        signs.pop();
      else
        signs.push(tmp);
    } else
      signs.push(tmp);
  }
  if (signs.size() == 0)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
