#include <bits/stdc++.h>
using namespace std;
char s[101111];
int n;
int main() {
  gets(s);
  n = strlen(s);
  bool ok = true;
  if (n & 1)
    ok = false;
  else {
    int k = 0;
    for (int i = 0; i < (n); ++i)
      if ((s[i] == '+') ^ (i & 1))
        ++k;
      else
        --k;
    ok = k == 0;
  }
  puts(ok ? "Yes" : "No");
  return 0;
}
