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