#include <bits/stdc++.h>
using namespace std;
char s[100010];
int q[100010];
int main() {
  int i, j, k, n, m;
  while (~scanf("%s", s)) {
    n = strlen(s);
    int top = 0;
    for (i = 0; i < n; i++) {
      if (s[i] == '+')
        q[++top] = 0;
      else
        q[++top] = 1;
      if (top >= 2 && q[top] == q[top - 1]) top -= 2;
    }
    if (top == 0)
      puts("Yes");
    else
      puts("No");
  }
  return 0;
}
