#include <bits/stdc++.h>
using namespace std;
const int ARRLEN = 100000;
char st[ARRLEN];
int main() {
  char c;
  int len = 0;
  while (scanf("%c", &c) && c == '-' || c == '+') {
    if (len != 0 && st[len - 1] != c) {
      int ind = len - 1;
      int cnt = 0;
      while (ind >= 0 && st[ind] == st[len - 1]) {
        cnt++;
        ind--;
      }
      if (cnt % 2 == 0) len = ind + 1;
    }
    st[len++] = c;
  }
  bool flag = true;
  for (int i = 0; i < len; ++i) {
    if (st[i] != st[0]) {
      flag = false;
      break;
    }
  }
  if (len % 2 != 0) {
    flag = false;
  }
  printf("%s", flag ? "Yes" : "No");
  return 0;
}
