#include <bits/stdc++.h>
using namespace std;
string s;
char c[100005];
int pl;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (i == 0) {
      pl++;
      c[pl] = s[i];
    } else {
      if (s[i] == c[pl]) {
        pl--;
      } else {
        pl++;
        c[pl] = s[i];
      }
    }
  }
  if (pl == 0) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}
