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