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