#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, sz, n, i, j;
  string str, str1 = "+";
  stack<char> ara, ara1;
  cin >> str;
  sz = str.size();
  for (i = 0; i < sz; i++) {
    if (ara.empty()) {
      ara.push(str[i]);
    } else {
      if (str[i] == ara.top()) {
        ara.pop();
      } else {
        ara.push(str[i]);
      }
    }
  }
  if (ara.empty()) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
