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