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