#include <bits/stdc++.h>
int main() {
  char a[105];
  int l, i, link = 0, perl = 0;
  scanf("%s", &a);
  l = strlen(a);
  for (i = 0; i < l; i++) {
    if (a[i] == 'o')
      perl++;
    else
      link++;
  }
  if (perl == 1 || link == 0)
    printf("YES");
  else if (perl == 0)
    printf("YES");
  else if (link % perl == 0)
    printf("YES");
  else
    printf("NO");
  return 0;
}
