#include <bits/stdc++.h>
using namespace std;
int main() {
  int a = 0, b = 0;
  char c;
  while (cin >> c) {
    if (c == 'o')
      a++;
    else if (c == '-')
      b++;
  }
  if (b == 0 || a == 0) {
    cout << "YES" << endl;
    return 0;
  } else if (b % a == 0) {
    cout << "YES" << endl;
    return 0;
  } else {
    cout << "NO" << endl;
    return 0;
  }
}
