#include <bits/stdc++.h>
using std::cin;
using std::cout;
int main() {
  int i = 0;
  int j = 0;
  char* a = new char[100001];
  a[0] = 's';
  char c;
  while (cin >> c) {
    if (c == a[i]) {
      --i;
    } else {
      ++i;
      a[i] = c;
    }
  }
  if (i == 0) {
    cout << "Yes\n";
    return 0;
  }
  cout << "No\n";
  return 0;
}
