#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int x = 0, y = 0;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '-')
      x++;
    else
      y++;
  }
  if (x == 0 || y == 0) {
    cout << "YES";
    return 0;
  }
  if (x < y) {
    cout << "NO";
    return 0;
  }
  if (x % y == 0)
    cout << "YES";
  else
    cout << "NO";
}
