#include <bits/stdc++.h>
using namespace std;
char c[100005];
int main() {
  int c1, c2, t = 1, ll = 0, r = 0;
  c1 = c2 = 0;
  scanf("%s", c);
  int l = strlen(c);
  for (int i = 0; i < l; i++) {
    if ((c[i] == '+') == (i % 2 == 0)) c1++;
  }
  if (c1 != l - c1)
    printf("No");
  else
    printf("Yes");
  return 0;
}
