#include <bits/stdc++.h>
using namespace std;
stack<char> mavtulebi;
char mavtuli;
string a;
int n, i;
int main() {
  cin >> a;
  n = a.size();
  for (i = 0; i < n; i++) {
    if (mavtulebi.size() == 0) {
      mavtulebi.push(a[i]);
      continue;
    }
    if (a[i] == mavtulebi.top())
      mavtulebi.pop();
    else
      mavtulebi.push(a[i]);
  }
  if (mavtulebi.size() == 0) cout << "Yes";
  if (mavtulebi.size() != 0) cout << "No";
}
