#include <bits/stdc++.h>
using namespace std;
stack<char> Q;
string chuan;
char ch;
int main() {
  while (cin >> chuan) {
    while (!Q.empty()) Q.pop();
    for (int m = 0; m < chuan.size(); m++) {
      ch = chuan[m];
      if (Q.empty()) {
        Q.push(ch);
      } else {
        char t = Q.top();
        if (t == ch)
          Q.pop();
        else
          Q.push(ch);
      }
    }
    int sizes = Q.size();
    if (sizes) {
      printf("No\n");
    } else
      printf("Yes\n");
  }
  return 0;
}
