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