#include <bits/stdc++.h>
using namespace std;
char ss[100100];
string s;
char sta[100100];
int main() {
  gets(ss);
  s = ss;
  int top = 1;
  sta[0] = s[0];
  for (int i = 1; i < s.size(); i++) {
    if (top > 0 && sta[top - 1] == s[i])
      top--;
    else {
      sta[top] = s[i];
      top++;
    }
  }
  if (top == 0)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
