#include <bits/stdc++.h>
using namespace std;
string seq;
int main() {
  cin >> seq;
  if (seq.size() % 2) {
    cout << "No\n";
    return 0;
  }
  int i = 0;
  while (i < seq.size()) {
    if (i < seq.size() - 1 && seq[i] == seq[i + 1]) {
      seq.erase(i, 2);
      i--;
    } else
      i++;
    if (i < 0) i = 0;
  }
  if (seq.size() == 0)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
