#include <bits/stdc++.h>
using namespace std;
double pi = 3.1415926536;
const int oo = (int)1e9;
const long long OO = numeric_limits<long long>::max();
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
int di[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dj[] = {1, -1, 0, 0, 1, -1, -1, 1};
int f1[] = {0, 0, 0, 1, 1, 1, -1, -1, -1};
int f2[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
int main() {
  ios_base::sync_with_stdio(false);
  string s;
  cin >> s;
  if (((int)(s).size()) == 1) {
    cout << "No";
    return 0;
  }
  stack<char> mystack;
  for (int i = 0; i < ((int)(s).size()); i++) {
    if (((int)(mystack).size()) >= 1) {
      if (mystack.top() == s[i]) {
        mystack.pop();
      } else {
        mystack.push(s[i]);
      }
    } else {
      mystack.push(s[i]);
    }
  }
  if (((int)(mystack).size())) {
    cout << "No";
  } else {
    cout << "Yes";
  }
}
