#include <bits/stdc++.h>
const int maxn = int(1e5) + 5;
using namespace std;
string s;
int main() {
  cin >> s;
  int l = 0, r = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '-') {
      l++;
    } else {
      r++;
    }
  }
  if (l == 0 or r == 0) {
    cout << "YES" << endl;
  } else {
    if (l % r == 0) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
