#include <bits/stdc++.h>
using namespace std;
int main() {
  string z;
  cin >> z;
  stack<char> s;
  int length = z.length();
  for (int i = 0; i < length; i++) {
    if (s.size() == 0 || z[i] != s.top()) {
      s.push(z[i]);
    } else
      s.pop();
  }
  if (s.size() == 0) {
    cout << "Yes";
  } else
    cout << "No";
  return 0;
}
