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