#include <bits/stdc++.h>
using namespace std;
stack<char> s1, s2;
string k;
bool t;
int main() {
  cin >> k;
  for (int i = 0; i < k.length(); i++) {
    s1.push(k[i]);
  }
  while (!s1.empty()) {
    if (s2.empty()) {
      s2.push(s1.top());
      s1.pop();
    } else {
      if (s1.top() == s2.top()) {
        s1.pop();
        s2.pop();
      } else {
        s2.push(s1.top());
        s1.pop();
      }
    }
  }
  if (!s2.size())
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
