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