#include <bits/stdc++.h>
int main() {
  int B = 0, A = 0, i;
  char str[105];
  gets(str);
  for (i = 0; str[i] != '\0'; i++) {
    if (str[i] == 'o') A++;
    if (str[i] == '-') B++;
  }
  if (A == 0)
    printf("YES");
  else if (B % A == 0)
    printf("YES");
  else
    printf("NO");
  return 0;
}
