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