#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int m = count(s.begin(), s.end(), '-');
  int n = count(s.begin(), s.end(), 'o');
  if (n == 1 || m == 0 || n == 0)
    cout << "YES";
  else if (m % n == 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
