#include <bits/stdc++.h>
int main() {
  int c, input[100010];
  int i = -1, j, k;
  while ((c = getchar()) != '\n') {
    if (i < 0 || input[i] != c)
      input[++i] = c;
    else
      i--;
  }
  if (i < 0)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
