#include <bits/stdc++.h>
using namespace std;
void sum(int *a) { *a += 20; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  stack<char> s1;
  string s;
  cin >> s;
  s1.push(s[0]);
  for (int i = 1; i < s.size(); i++) {
    if (s[i] == s1.top())
      s1.pop();
    else
      s1.push(s[i]);
    if (!s1.size() && i < s.size() - 1) s1.push(s[i + 1]), ++i;
  }
  if (!s1.size())
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
