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