#include <bits/stdc++.h>
using namespace std;
char c;
stack<char> s;
int main(int argc, const char* argv[]) {
  while ((c = getchar()) != '\n') {
    if (s.empty()) {
      s.push(c);
    } else {
      if (s.top() == c) {
        s.pop();
      } else {
        s.push(c);
      }
    }
  }
  if (s.empty()) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}
