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