#include <bits/stdc++.h>
using namespace std;
int i;
string s;
char x[100001];
int main() {
  cin >> s;
  for (int j = 0; j < s.length(); j++)
    if (s[j] == x[i])
      i--;
    else
      x[++i] = s[j];
  cout << (i ? "No" : "Yes");
  return 0;
}
