#include <bits/stdc++.h>
using namespace std;
unordered_map<long long, int> mapcheck;
set<long long, int> setcheck;
long long n;
long long a[200010];
char str[20000];
int main() {
  scanf("%s", str + 1);
  n = strlen(str + 1);
  int pcnt = 0;
  int lcnt = 0;
  for (int i = 1; i <= n; i++) {
    if (str[i] == 'o') {
      pcnt++;
    }
  }
  if (pcnt == n) {
    cout << "YES" << endl;
    return 0;
  }
  if (pcnt == 0) {
    cout << "YES" << endl;
    return 0;
  } else if (pcnt == 1) {
    cout << "YES" << endl;
    return 0;
  } else {
    if ((n - pcnt) % pcnt == 0) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
