#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  int temp = 0;
  int temp2 = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '-') temp++;
    if (s[i] == 'o') temp2++;
  }
  if (temp2 == 0) {
    puts("YES");
    return 0;
  }
  if (temp % temp2 == 0)
    puts("YES");
  else
    puts("NO");
  return 0;
}
