#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
char s[N];
int no() {
  printf("No\n");
  return 0;
}
int yes() {
  printf("Yes\n");
  return 0;
}
int main() {
  scanf("%s", s);
  int l = strlen(s);
  if (l & 1) return no();
  for (int i = 1; i < l; i += 2) {
    s[i] = (s[i] == '+') ? '-' : '+';
  }
  int v = 0;
  for (int i = 0; i < l; ++i) {
    v += (s[i] == '+') ? 1 : -1;
  }
  if (v == 0)
    return yes();
  else
    return no();
}
