#include <bits/stdc++.h>
using namespace std;
int main() {
  int a = 0, b = 0;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); ++i) ((s[i] == '-') ? ++a : ++b);
  cout << ((b == 0) ? "YES" : ((a % b == 0) ? "YES" : "NO"));
  return 0;
}
