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