#include <bits/stdc++.h>
int main() {
  char a[1000], i, d = 0, b = 0;
  scanf("%s", a);
  for (i = 0; a[i] != '\0'; i++) {
    if (a[i] == 'o') b++;
    if (a[i] == '-') d++;
  }
  if (b == 0) {
    printf("YES");
  } else if (d % b == 0)
    printf("YES");
  else
    printf("NO");
}
