#include <bits/stdc++.h>
char str[100000 + 7];
int N;
int top = 0;
int stack[100000 + 7];
int Work(int L, int R) {
  for (int i = L; i <= R; i++) {
    if (!top || stack[top] != str[i])
      stack[++top] = str[i];
    else
      top--;
  }
  return !top;
}
int main() {
  scanf("%s", str + 1);
  N = strlen(str + 1);
  if (N % 2 == 1)
    puts("No");
  else
    puts(Work(1, N) ? "Yes" : "No");
  return 0;
}
