#include <bits/stdc++.h>
using namespace std;
string s;
void merg(long int l, long int mid, long int r, long int a[]) {
  long int ll[mid - l + 1], rr[r - mid];
  for (long int i = 0; i < mid - l + 1; i++) ll[i] = a[l + i];
  for (long int i = 0; i < r - mid; i++) rr[i] = a[mid + i + 1];
  long int cnt1 = 0, cnt2 = 0, cnt = l;
  while (cnt1 < mid - l + 1 && cnt2 < r - mid) {
    if (ll[cnt1] <= rr[cnt2]) {
      a[cnt] = ll[cnt1];
      cnt1++;
    } else {
      a[cnt] = rr[cnt2];
      cnt2++;
    }
    cnt++;
  }
  while (cnt1 < mid - l + 1) {
    a[cnt++] = ll[cnt1++];
  }
  while (cnt2 < r - mid) {
    a[cnt++] = rr[cnt2++];
  }
}
void merge_sort(long int l, long int r, long int a[]) {
  if (r > l) {
    long int mid = l + (r - l) / 2;
    merge_sort(l, mid, a);
    merge_sort(mid + 1, r, a);
    merg(l, mid, r, a);
  }
}
vector<char> vec;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> s;
  for (long int i = 0; i < s.size(); i++) {
    if (vec.size() == 0 || vec.back() != s[i])
      vec.push_back(s[i]);
    else
      vec.pop_back();
  }
  if (vec.size() == 0)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
