#include <bits/stdc++.h>
using namespace std;
string s;
int a, b;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'o')
      a++;
    else
      b++;
  }
  if (a == 0)
    cout << "YES" << endl;
  else if (b % a == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
