#include <bits/stdc++.h>
using namespace std;
int N;
char S[100010];
stack<char> stk;
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
  }
  gets(S);
  N = strlen(S);
  for (int i = 0; i < N; i++) {
    char c = S[i];
    if (!stk.empty() && c == stk.top()) {
      stk.pop();
    } else {
      stk.push(c);
    }
  }
  puts(stk.empty() ? "Yes" : "No");
}
