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