#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = double;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cout << *it << " = " << a << endl;
  err(++it, args...);
}
const ll MODBASE = 1000000007LL;
const int MAXN = 200010;
string s;
stack<int> st;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cin >> s;
  for (int i = (0); i <= (int((s).size()) - 1); i++) {
    if (st.empty() || st.top() != s[i])
      st.push(s[i]);
    else
      st.pop();
  }
  if (int((st).size()) == 0)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
