#include <bits/stdc++.h>
using namespace std;
string s;
stack<char> w;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> s;
  long long Length = s.length();
  if (Length % 2) {
    cout << "No";
    return 0;
  } else {
    for (int i = 0; i < (Length); ++i) {
      if (w.size() > 0 && s[i] == w.top()) {
        w.pop();
        continue;
      }
      w.push(s[i]);
    }
    if (w.size() != 0)
      cout << "No";
    else
      cout << "Yes";
  }
  return 0;
}
