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