#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  int p = 0;
  int l = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-')
      l += 1;
    else
      p += 1;
  }
  if (l == 0 || p == 0) {
    cout << "YES" << endl;
    return 0;
  } else if (l % p == 0) {
    cout << "YES" << endl;
    return 0;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
