#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  int l = 0, o = 0;
  cin >> str;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == '-') {
      l++;
    } else
      o++;
  }
  if (l == 0 || o == 0 || l % o == 0) {
    cout << "YES";
  } else
    cout << "NO";
  return 0;
}
