#include <bits/stdc++.h>
using namespace std;
string s;
int cnt1, cnt2;
int main() {
  cin >> s;
  for (auto it : s) {
    if (it == '-')
      cnt1++;
    else
      cnt2++;
  }
  if (cnt2 == 0 || cnt1 % cnt2 == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
