#include <bits/stdc++.h>
using namespace std;
string s;
int a[111111];
int main() {
  getline(cin, s);
  int len = s.length();
  for (int i = len - 1; i >= 0; i--)
    if (i == len - 1)
      a[i] = 1;
    else {
      if (s[i] == s[i + 1])
        a[i] = a[i + 1] + 1;
      else
        a[i] = 1;
    }
  set<pair<int, int>> S;
  for (int i = len - 1; i >= 0; i--)
    if (i == 0 || s[i] != s[i - 1]) {
      int cur = a[i];
      if (s[i] == '-') cur *= -1;
      S.insert(make_pair(i, cur));
    }
  for (set<pair<int, int>>::iterator iter = S.begin(); iter != S.end();
       iter++) {
    pair<int, int> cur = *iter;
    while (cur.second % 2 == 0) {
      if (iter == S.begin()) {
        iter = S.begin();
        S.erase(cur);
        break;
      }
      iter--;
      S.erase(cur);
      set<pair<int, int>>::iterator ita = iter;
      iter++;
      if (iter == S.end()) break;
      set<pair<int, int>>::iterator itb = iter;
      iter++;
      if (ita->second * itb->second > 0) {
        cur = make_pair(ita->first, ita->second + itb->second);
        S.erase(itb);
        S.erase(ita);
        S.insert(cur);
        iter--;
      } else {
        iter--;
        iter--;
      }
    }
    if (S.empty()) break;
  }
  if (S.empty())
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
