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