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