#include <bits/stdc++.h>
using namespace std;
long long int max(long long int a, long long int b) {
  if (a > b) return a;
  return b;
}
int main() {
  string str;
  while (cin >> str) {
    int tt[2] = {0};
    for (int i = 0; i < str.length(); i++) {
      if (str[i] == '-') {
        tt[1]++;
      } else {
        tt[0]++;
      }
    }
    int flag = 1;
    if (tt[0] == 0) {
      cout << "YES" << endl;
    } else {
      double mid = tt[1] * 1.0 / tt[0];
      if ((int)mid == mid) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
    }
  }
  return 0;
}
