#include <bits/stdc++.h>
using namespace std;
string s;
vector<char> v;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (v.size() > 0) {
      if (v.back() == s[i])
        v.pop_back();
      else
        v.push_back(s[i]);
    } else
      v.push_back(s[i]);
  }
  if (v.size() == 0)
    cout << "Yes";
  else
    cout << "No";
}
