#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  stack<char> current;
  for (int i = 0; i < s.size(); i++) {
    if (!current.empty() && s.at(i) == current.top())
      current.pop();
    else
      current.push(s.at(i));
  }
  cout << (current.empty() ? "Yes" : "No");
  return 0;
}
