#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int o = 0, p = 0;
  for (char c : s) {
    if (c == 'o')
      o++;
    else
      p++;
  }
  if (o == 0) {
    cout << "YES";
    return 0;
  }
  if (p % o == 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
