#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  char a[100010];
  int k;
  cin >> s;
  k = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == a[k])
      k--;
    else {
      k++;
      a[k] = s[i];
    }
  }
  if (k == 0)
    cout << "Yes";
  else
    cout << "No";
}
