#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  long long a = 0, b = 0;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == 'o')
      a++;
    else
      b++;
  }
  if (b == 1) {
    cout << "NO";
  } else if (a == 0 || b == 0) {
    cout << "YES";
  } else {
    if ((b % a == 0) && b > 1) {
      cout << "YES";
    } else
      cout << "NO";
  }
  return 0;
}
