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