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