#include <bits/stdc++.h>
const int MAXN = 100001;
char str[MAXN];
int main() {
  int lcnt = 0, pcnt = 0;
  scanf("%s", str);
  for (int i = 0; i < strlen(str); ++i)
    if (str[i] == '-')
      ++lcnt;
    else
      ++pcnt;
  printf("%s", pcnt == 0 || lcnt % pcnt == 0 ? "YES" : "NO");
  return 0;
}
