#include <bits/stdc++.h>
using namespace std;
string S;
int p, m;
char l;
int mark[100010];
int main() {
  cin >> S;
  for (int i = 0; i < S.size(); ++i) {
    if (i % 2 == 1 && S[i] == '+') ++p;
    if (i % 2 == 1 && S[i] == '-') ++m;
    if (i % 2 == 0 && S[i] == '+') ++m;
    if (i % 2 == 0 && S[i] == '-') ++p;
  }
  if (p == m)
    cout << "Yes\n";
  else
    cout << "No\n";
}
