#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 50;
const int inf = 1e9;
int main() {
  string s;
  cin >> s;
  int cnto = 0, cnt_ = 0;
  for (string::iterator it = s.begin(); it != s.end(); ++it) {
    char ch = *it;
    if (ch == 'o')
      cnto++;
    else
      cnt_++;
  }
  if (cnto == 0)
    printf("YES\n");
  else if (cnt_ % cnto == 0)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
