#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int N = 1e5 + 10;
vector<char> stk;
char second[N];
int n;
int main() {
  scanf("%s", second);
  n = strlen(second);
  for (int i = 0; i < n; ++i)
    if (stk.size() && second[i] == stk.back())
      stk.pop_back();
    else
      stk.push_back(second[i]);
  if (stk.size() == 0)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
