#include <bits/stdc++.h>
using namespace std;
char A[100005];
char S[100005];
int n, w;
int main() {
  scanf("%s", A);
  n = strlen(A);
  for (int i = (0); i < (n); i++) {
    if (w == 0 || A[i] != S[w - 1]) {
      S[w] = A[i];
      w++;
    } else
      w--;
  }
  if (w == 0)
    printf("yes\n");
  else
    printf("no\n");
  return 0;
}
