#include <bits/stdc++.h>
int main() {
  char s[105];
  scanf("%s", s);
  int len = strlen(s);
  int a = 0, b = 0;
  for (int i = 0; i < len; i++) {
    if (s[i] == '-')
      a++;
    else
      b++;
  }
  if (b == 0 || a == 0 || a % b == 0) {
    puts("YES");
  } else {
    puts("NO");
  }
}
