#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  string s;
  cin >> s;
  if (s.size() & 1)
    puts("No");
  else {
    int x = 0;
    for (int i = 0; i < s.size(); i++) {
      if (s[i] == '+') x += (i & 1) ? 1 : -1;
      if (s[i] == '-') x += (i & 1) ? -1 : 1;
    }
    puts(x == 0 ? "Yes" : "No");
  }
}
