#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  long long a = 0, b = 0;
  for (long long i = 0; i < s.length(); ++i) {
    if (s[i] == 'o')
      ++a;
    else
      ++b;
  }
  if (a == 0)
    cout << "YES";
  else if (b % a)
    cout << "NO";
  else
    cout << "YES";
}
