#include <bits/stdc++.h>
using namespace std;
vector<char> q;
string a;
int main() {
  long long i, j, ii, jj, ind;
  cin >> a;
  for (i = 0; i < a.length(); i++) {
    if (q.empty())
      q.push_back(a[i]);
    else {
      if (q.back() == a[i])
        q.pop_back();
      else
        q.push_back(a[i]);
    }
  }
  if (q.empty())
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
