#include <bits/stdc++.h>
using namespace std;
char c[100004], t[100004];
int to = 0;
int main() {
  scanf("%s", &c);
  int x = strlen(c);
  for (int i = 0; i < x; i++) {
    if (c[i] != t[to] || to == 0)
      t[++to] = c[i];
    else
      to--;
  }
  if (to == 0)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
