#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int MAX = 1000007;
const int MAX1 = 2007;
const int MAX2 = 4007;
const int LEN = 21;
const int BASE = 1000000000;
const double EPS = 1e-7;
const int MOD = 1234567891;
int main(void) {
  string s;
  cin >> s;
  int ct1 = 0, ct2 = 0;
  for (int i = (0); i < ((int)s.size()); ++i) {
    if (s[i] == 'o')
      ++ct1;
    else
      ++ct2;
  }
  if (ct1 == 0)
    cout << "YES";
  else if (ct2 % ct1 == 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
