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