#include <bits/stdc++.h>
using namespace std;
char a[200000], b[200000];
int h = 0;
int main() {
  cin >> a;
  for (int i = 0; a[i]; i++) {
    if (h > 0 && b[h - 1] == a[i])
      h--;
    else
      b[h++] = a[i];
  }
  cout << (h ? "No" : "Yes");
}
