#include <bits/stdc++.h>
using namespace std;
int main() {
  stack<char> hola;
  char c;
  while (cin >> c) {
    if (hola.empty() or hola.top() != c)
      hola.push(c);
    else
      hola.pop();
  }
  if (!hola.empty())
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
}
