#include <bits/stdc++.h>
using namespace std;
int main() {
  char Tab[100];
  scanf("%s", Tab);
  string s = Tab;
  int p = 0, l = 0;
  for (int i = 0; i < (int)s.size(); ++i)
    if (s[i] == 'o')
      ++p;
    else
      ++l;
  if (p == 0 || l % p == 0)
    printf("YES");
  else
    printf("NO");
  return 0;
}
