#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[100000];
  int n, m;
  cin >> a;
  n = 0;
  m = 0;
  for (int i = 0; i < strlen(a); i++) {
    if (a[i] == 'o') {
      n++;
    }
    if (a[i] == '-') {
      m++;
    }
  }
  if (n == 0) {
    cout << "YES" << endl;
  } else if (m % n == 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
