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