#include <bits/stdc++.h>
using namespace std;
string st;
long long cnt_p, cnt_l, temp;
int main() {
  cin >> st;
  for (char& v : st) {
    if (v == 'o')
      ++cnt_p;
    else
      ++cnt_l;
  }
  if (cnt_p == 0) cnt_p = 1;
  temp = cnt_l / cnt_p;
  cout << (temp * cnt_p == cnt_l ? "YES" : "NO");
  return 0;
}
