#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, -1, 1};
int main() {
  ios::sync_with_stdio(0);
  string s;
  cin >> s;
  if (s.size() == 1) {
    cout << "No\n";
    return 0;
  }
  stack<char> q;
  for (int i = 0; i < s.size(); ++i) {
    if (q.empty())
      q.push(s[i]);
    else if ((q.top() == '+' && s[i] == '+') || (q.top() == '-' && s[i] == '-'))
      q.pop();
    else
      q.push(s[i]);
  }
  if (q.empty())
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
