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