#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int dd = 0;
  int oo = 0;
  int n = s.length();
  for (int i = 0; i < n; i++) {
    if (s[i] == '-')
      dd++;
    else
      oo++;
  }
  if (oo == 0) {
    cout << "YES" << '\n';
    return 0;
  }
  if (dd % oo == 0) {
    cout << "YES" << '\n';
    return 0;
  }
  cout << "NO" << '\n';
  return 0;
}
