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