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