#include <bits/stdc++.h>
using namespace std;
int main() {
  string c;
  cin >> c;
  int countl = 0, countp = 0;
  for (int i = 0; i < c.size(); i++) {
    if (c[i] == '-') countl++;
    if (c[i] == 'o') countp++;
  }
  int ans = max(countl, countp);
  if (countp == 0 || countl == 0) {
    cout << "YES" << endl;
    return 0;
  } else if (countl == 1) {
    cout << "NO" << endl;
    return 0;
  } else if (ans == countl && countl % countp == 0) {
    cout << "YES" << endl;
    return 0;
  } else
    cout << "NO" << endl;
  return 0;
}
