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