#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string necklace;
  long long cLink = 0, cPearl = 0;
  cin >> necklace;
  for (int i = 0; i <= necklace.size() - 1; i++) {
    if (necklace[i] == '-')
      cLink += 1;
    else
      cPearl += 1;
  }
  if (cPearl == 0)
    cout << "YES" << endl;
  else
    cout << (cLink % cPearl == 0 ? "YES" : "NO") << endl;
  return 0;
}
