#include <bits/stdc++.h>
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  string s;
  cin >> s;
  int n = s.size();
  int i;
  int a = 0;
  int b = 0;
  for (i = 0; i < n; i++) {
    if (s[i] == '-')
      a++;
    else
      b++;
  }
  if (b == 0 || a % b == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
