#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int _cnt = 0, ocnt = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '-')
      _cnt++;
    else
      ocnt++;
  }
  if (ocnt == 0)
    printf("YES\n");
  else if (_cnt % ocnt == 0)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
