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