#include <bits/stdc++.h>
using namespace std;
signed main() {
  string s;
  cin >> s;
  long long cnt = 0;
  long long cntt = 0;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == '-') {
      cnt++;
    }
    if (s[i] == 'o') {
      cntt++;
    }
  }
  if (cntt == 0) {
    cout << "YES";
    return 0;
  }
  if (cnt % cntt == 0) {
    cout << "YES";
    return 0;
  }
  cout << "NO";
}
