#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n, d = 0;
  n = s.size();
  for (int i = 0; i < n; i++) {
    if (s[i] == 'o') d++;
  }
  if (d == 0) {
    cout << "YES";
    return 0;
  }
  if ((n - d) % d == 0) {
    cout << "YES";
    return 0;
  }
  cout << "NO";
}
