#include <bits/stdc++.h>
using namespace std;
int main() {
  char c, prev;
  int plus = 0, minus = 0, i = 0;
  while (cin >> c) {
    if (c == '+') {
      if (i % 2 == 0)
        plus--;
      else
        plus++;
    }
    if (c == '-') {
      if (i % 2 == 0)
        minus--;
      else
        minus++;
    }
    i++;
  }
  cout << ((plus == 0 && minus == 0) ? "Yes" : "No");
  return 0;
}
