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