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