#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = 0, m = 0;
  for (auto& i : s) {
    if (i == '-') {
      m++;
    } else {
      n++;
    }
  }
  if (n == 0 || n == 1) {
    cout << "YES";
  } else if (m % n != 0) {
    cout << "NO";
  } else {
    cout << "YES";
  }
  return 0;
}
