#include <bits/stdc++.h>
using namespace std;
int const maxn = 100 * 1000 + 1;
string ss;
stack<char> s;
int main() {
  cin >> ss;
  int n = ss.length();
  for (int i = 0; i < n; i++) {
    char c = ss[i];
    if (s.empty() || s.top() != c)
      s.push(c);
    else
      s.pop();
  }
  if (s.empty())
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
