#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  string s;
  cin >> s;
  long long int n = s.length(), i;
  stack<char> a;
  for (i = 0; i < n; i++) {
    if (a.empty())
      a.push(s[i]);
    else {
      if (a.top() == s[i])
        a.pop();
      else
        a.push(s[i]);
    }
  }
  if (a.size() != 0)
    cout << "No";
  else
    cout << "Yes";
}
