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