#include <bits/stdc++.h>
using namespace std;
const int MAX = 100100;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(false);
  int a = 0, b = 0;
  string str;
  cin >> str;
  for (int i = 0, len = str.size(); i < len; ++i) {
    if (str[i] == '-')
      ++a;
    else
      ++b;
  }
  cout << ((!b || a % b == 0) ? "YES" : "NO") << endl;
  return 0;
}
