#include <bits/stdc++.h>
using namespace std;
void solve() {
  stack<char> q;
  string s;
  cin >> s;
  for (long long int i = 0; i < s.length(); i++) {
    if (!q.empty() && q.top() == s[i])
      q.pop();
    else
      q.push(s[i]);
  }
  cout << (q.empty() ? "Yes" : "No") << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  t = 1;
  while (t--) {
    solve();
  }
}
