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