#include <bits/stdc++.h>
const int maxn = 3e5 + 5;
using namespace std;
char str[10005];
int main() {
  cin >> str;
  int len = strlen(str);
  int s1 = 0, s2 = 0;
  for (int t = 0; t < len; t++) {
    if (str[t] == '-') {
      s1++;
    } else {
      s2++;
    }
  }
  if (s2 == 0 || s1 % s2 == 0) {
    puts("YES");
  } else {
    puts("NO");
  }
  return 0;
}
