#include <bits/stdc++.h>
int main() {
  int dash = 0, dot = 0;
  char c[200];
  scanf("%s", c);
  int l = strlen(c);
  for (int i = 0; i < l; i++) {
    if (c[i] == 'o') {
      dot++;
    } else {
      dash++;
    }
  }
  if (dot == 0) {
    printf("YES");
  } else if (dash % dot == 0) {
    printf("YES");
  } else {
    printf("NO");
  }
}
