#include <bits/stdc++.h>
using namespace std;
long long int n, m, i, j, k, l, c[201010], r;
int main() {
  string s;
  cin >> s;
  for (i = 0; i < s.size(); i++) {
    if (s[i] == '-')
      l++;
    else
      r++;
  }
  if (l == 0 || r == 0) {
    cout << "YES";
  } else {
    if (l % r == 0) {
      cout << "YES";
    } else
      cout << "NO";
  }
}
