#include <bits/stdc++.h>
using namespace std;
vector<char> v;
int main() {
  int w = 0, sum = 0;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-') {
      w = 1;
    } else {
      sum++;
    }
  }
  if (sum % 2 == 1) {
    cout << "No";
    return 0;
  }
  if (w == 0) {
    cout << "Yes";
    return 0;
  }
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-') {
      if (v.size() == 0) {
        v.push_back(s[i]);
      } else {
        if (v.back() == '-') {
          v.pop_back();
        } else {
          v.push_back('-');
        }
      }
    }
    if (s[i] == '+') {
      if (v.size() == 0) {
        v.push_back(s[i]);
      } else {
        if (v.back() == '+') {
          v.pop_back();
        } else {
          v.push_back('+');
        }
      }
    }
  }
  if (v.size() > 0) {
    cout << "No";
  } else {
    cout << "Yes";
  }
}
