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