#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  long long int a = 0, b = 0;
  for (long long int i = 0; i < s.length(); i++) {
    if (s[i] == 'o')
      a++;
    else
      b++;
  }
  if (a == 0 || (a != 0 && b % a == 0))
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
