#include <bits/stdc++.h>
using namespace std;
int main() {
  stack<char> Stack;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    char ch = s[i];
    if (!Stack.empty() && ch == Stack.top())
      Stack.pop();
    else
      Stack.push(ch);
  }
  if (Stack.empty())
    printf("Yes\n");
  else
    printf("No\n");
}
