#include <bits/stdc++.h>
using namespace std;
inline bool checkBit(long long n, int i) { return n & (1LL << i); }
inline long long setBit(long long n, int i) {
  return n | (1LL << i);
  ;
}
inline long long resetBit(long long n, int i) { return n & (~(1LL << i)); }
inline bool EQ(double a, double b) { return fabs(a - b) < 1e9; }
char s[100100];
int main() {
  scanf("%s", s);
  int len = strlen(s), dec = 0;
  for (int i = 0; i < len; ++i) {
    if (i & 1) {
      if (s[i] == '-')
        ++dec;
      else
        --dec;
    } else {
      if (s[i] == '+')
        ++dec;
      else
        --dec;
    }
  }
  printf("%s", dec ? "No" : "Yes");
  return 0;
}
