#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n1 = 0, n2 = 0;
  string s;
  cin >> s;
  long long int size = s.size();
  for (long long int i = 0; i < size; i++) {
    if (s[i] == 'o')
      n1++;
    else
      n2++;
  }
  if (n1 == 0 || n2 == 0 || (n1 != 0 && n2 % n1 == 0))
    cout << "YES";
  else
    cout << "NO";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) solve();
  return 0;
}
