#include <bits/stdc++.h>
using namespace std;
using LL = long long;
constexpr int N = 1e5 + 5;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  string s;
  cin >> s;
  stack<char> stk;
  for (char &c : s) {
    if (!stk.empty()) {
      if (stk.top() == c)
        stk.pop();
      else
        stk.push(c);
    } else
      stk.push(c);
  }
  if (stk.empty())
    cout << "Yes\n";
  else
    cout << "No\n";
}
