#include <bits/stdc++.h>
using namespace std;
int main() {
  char b[105];
  int n = 0, m = 0;
  while (~scanf("%s", b)) {
    int c = strlen(b);
    n = 0, m = 0;
    for (int i = 0; i < c; i++) {
      if (b[i] == '-')
        n++;
      else
        m++;
    }
    if (m == 0)
      puts("YES");
    else if (n % m == 0)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
