#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  string s;
  cin >> s;
  if (s.length() % 2 == 1) {
    cout << "No\n";
    return 0;
  }
  int a = 0;
  for (int i = 0; i < s.length(); i += 2) {
    if (s[i] == '+' && s[i + 1] == '-')
      ++a;
    else if (s[i] == '-' && s[i + 1] == '+')
      --a;
  }
  if (a == 0) {
    cout << "Yes\n";
  } else
    cout << "No\n";
}
