#include <bits/stdc++.h>
using namespace std;
string s;
int n, i, res = 0;
int main() {
  cin >> s;
  n = s.length();
  for (i = 0; i < n; i++)
    if (i % 2 && s[i] == '+')
      res++;
    else if (i % 2 && s[i] == '-')
      res--;
    else if (s[i] == '+')
      res--;
    else if (s[i] == '-')
      res++;
  if (res == 0)
    cout << "Yes";
  else
    cout << "No";
}
