#include <bits/stdc++.h>
using namespace std;
template <class T>
void out(T A[], int n) {
  for (int i = 0; i < n; i++) cout << A[i] << " ";
  cout << endl;
}
template <class T>
void out(vector<T> A, int n = -1) {
  if (n == -1) n = A.size();
  for (int i = 0; i < n; i++) cout << A[i] << " ";
  cout << endl;
}
const int MAXN = 99999;
const int MAXM = 9999999;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const double EPS = 1e-11;
string str;
int main() {
  int i;
  stack<char> s;
  cin >> str;
  for (i = 0; i < str.size(); i++) {
    if (s.empty())
      s.push(str[i]);
    else {
      if (str[i] == s.top())
        s.pop();
      else
        s.push(str[i]);
    }
  }
  if (s.empty())
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
