#include <bits/stdc++.h>
using namespace std;
void hi() {
  static long long i = 0;
  cout << "Check Point : " << ++i << "\n";
  return;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long t;
  t = 1;
  while (t--) {
    string str;
    cin >> str;
    long long n = str.length();
    stack<char> stk;
    for (long long i = 0; i < n; i++) {
      if (!stk.empty() && ((stk.top() == '+' && str[i] == '+') ||
                           ((stk.top() == '-' && str[i] == '-')))) {
        stk.pop();
      } else {
        stk.push(str[i]);
      }
    }
    if (stk.empty()) {
      cout << "Yes"
           << "\n";
    } else {
      cout << "No"
           << "\n";
    }
  }
  return 0;
}
