#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int j = 0, k = 0;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '-')
      j++;
    else
      k++;
  }
  if (k == 0)
    cout << "YES" << endl;
  else if (j % k == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
