#include <bits/stdc++.h>
int main(void) {
  int stack[100000 + 1], sp = 0, c;
  stack[0] = '\0';
  while (c = getchar(), c != '\n') {
    if (c == stack[sp])
      --sp;
    else
      stack[++sp] = c;
  }
  printf("%s\n", sp == 0 ? "Yes" : "No");
  exit(EXIT_SUCCESS);
}
