#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  long long n;
  cin >> s;
  n = s.size();
  stack<char> A;
  if (n == 1 && (s[0] == '-' || s[0] == '+')) {
    cout << "No" << endl;
    return 0;
  }
  long long i = 0;
  while (i < n) {
    if (A.empty()) {
      A.push(s[i]);
    } else if (A.top() == s[i]) {
      A.pop();
    } else {
      A.push(s[i]);
    }
    i++;
  }
  if (A.empty()) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
