#include <bits/stdc++.h>
using ll = long long;
using ull = unsigned long long;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ll t;
  t = 1;
  while (t--) {
    ll i, j, k, c = 0;
    string s;
    cin >> s;
    for (ll i = 0; i < s.size(); i++) {
      if (i % 2 == 0) {
        if (s[i] == '-') {
          s[i] = 'B';
        } else {
          s[i] = 'A';
        }
      } else {
        if (s[i] == '-') {
          s[i] = 'A';
        } else {
          s[i] = 'B';
        }
      }
    }
    for (ll i = 0; i < s.size(); i++) {
      if (s[i] == 'A') {
        c++;
      } else {
        c--;
      }
    }
    if (c == 0) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
