#include <bits/stdc++.h>
using namespace std;
char str[100010], st[100010];
int len, top;
int main() {
  scanf("%s", str);
  len = strlen(str);
  if (len % 2 == 1) {
    printf("No\n");
    return 0;
  }
  st[0] = str[0], top = 1;
  for (int i = 1; i < len; i++) {
    if (top != 0 && st[top - 1] == str[i])
      top--;
    else
      st[top] = str[i], top++;
  }
  if (top == 0)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
