#include <bits/stdc++.h>
using namespace std;
long long fpow(long long n, long long k, long long p = 1e9 + 7) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
int main() {
  int link = 0, pearls = 0;
  string neck;
  cin >> neck;
  int len = neck.length();
  for (int i = 0; i < len; i++) {
    if (neck[i] == '-')
      link++;
    else
      pearls++;
  }
  if (pearls == 0 || link % pearls == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
