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