#include <bits/stdc++.h>
using namespace std;
const int nm = 100005;
const int mm = 1005;
int n, k, m, t, chan, le;
char s[nm], st[nm];
bool check[nm];
int main() {
  int i, j, x, y, z, w;
  scanf("%s", &s);
  n = strlen(s);
  i = 0;
  for (j = 0; j < n; j++) {
    if (i > 0 && st[i - 1] == s[j])
      i--;
    else
      st[i++] = s[j];
  }
  if (i)
    printf("No");
  else
    printf("Yes");
}
