#include <bits/stdc++.h>
using namespace std;
inline int read();
inline void write(int x);
const int M = 100016;
int save[M];
int main(void) {
  char str[128];
  scanf("%s", str);
  int a1 = 0, a2 = 0;
  for (int i = 0; str[i]; i++) {
    if (str[i] == '-')
      a1++;
    else
      a2++;
  }
  if (a2 == 0)
    printf("YES\n");
  else if (a1 % a2 == 0)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline void write(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
