#include <bits/stdc++.h>
const int MX = 100100;
int stackN[MX], n;
char stackC[MX];
char cade[MX];
int main() {
  scanf("%s", cade);
  int i = 0;
  while (cade[i]) {
    if (n == 0 || stackC[n - 1] != cade[i]) {
      stackC[n] = cade[i];
      stackN[n] = 1;
      n++;
    } else {
      stackN[n - 1]++;
      stackN[n - 1] = stackN[n - 1] % 2;
    }
    while (1) {
      if (n && stackN[n - 1] % 2 == 0)
        n--;
      else if (n > 2 && stackC[n - 1] == stackC[n - 2]) {
        stackN[n - 2] += stackN[n - 1];
        n--;
      } else
        break;
    }
    i++;
  }
  if (n)
    printf("No\n");
  else
    printf("Yes\n");
  return 0;
}
