#include <bits/stdc++.h>
using namespace std;
stack<char> s;
int main() {
  char c;
  while ((c = getchar()) != EOF && c != '\n') {
    if (s.empty() == 0 && c == s.top())
      s.pop();
    else
      s.push(c);
  }
  if (s.empty() == 1)
    puts("Yes");
  else
    puts("No");
  return 0;
}
