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