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