#include <bits/stdc++.h>
using namespace std;
struct Stack {
  unsigned char val;
  Stack *next;
};
Stack *t = NULL;
char ch;
void push(Stack *&s, unsigned char c) {
  Stack *u;
  u = new (Stack);
  u->val = c;
  u->next = s;
  s = u;
}
int main() {
  string s;
  cin >> s;
  int len = s.length();
  for (int i = 0; i < len; i++) {
    if (t == NULL)
      push(t, s[i]);
    else if (s[i] != t->val)
      push(t, s[i]);
    else
      t = t->next;
  }
  if (t == NULL)
    printf("Yes");
  else
    printf("No");
  return 0;
}
