#include <bits/stdc++.h>
int main() {
  int a, c, b, links = 0, pearls = 0;
  char s[105];
  scanf("%s", s);
  a = strlen(s);
  for (b = 0; b < a; b++) {
    if (s[b] == 'o')
      pearls++;
    else
      links++;
  }
  if (pearls == 0)
    printf("YES");
  else {
    if (links % pearls == 0)
      printf("YES");
    else
      printf("NO");
  }
}
