#include <bits/stdc++.h>
using namespace std;
const int maxn = 510;
char s[maxn];
int main() {
  int n;
  while (~scanf("%s", s)) {
    n = 0;
    int len = strlen(s);
    for (int i = 0; i < len; i++)
      if (s[i] == 'o') ++n;
    if (n == 0 || (len - n) % n == 0)
      printf("YES\n");
    else
      printf("NO\n");
  }
}
