#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int MAX = 5e3 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  int c1 = 0, c2 = 0;
  for (int i = 0; i <= s.size() - 1; ++i) {
    if (s[i] == '-')
      c1++;
    else
      c2++;
  }
  if (!c1 || !c2)
    cout << "YES" << endl;
  else if (c1 % c2 == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
