#include <bits/stdc++.h>
using namespace std;
class AlterCurrent {
 public:
  int fun(string str) {
    stack<char> stk;
    for (int i = 0; i < str.size(); ++i) {
      if (stk.empty() or str[i] != stk.top())
        stk.push(str[i]);
      else
        stk.pop();
    }
    if (stk.empty())
      return 1;
    else
      return 0;
  }
};
int main() {
  string temp;
  cin >> temp;
  AlterCurrent obj;
  if (obj.fun(temp))
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
