#include <bits/stdc++.h>
using namespace std;
int main() {
  deque<char> otv;
  char c;
  while (cin >> c) {
    if (otv.size() > 0) {
      if (otv.back() == c) {
        otv.pop_back();
      } else {
        otv.push_back(c);
      }
    } else {
      otv.push_back(c);
    }
  }
  if (otv.size() == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
