#include <bits/stdc++.h>
using namespace std;
string str;
int cnt1, cnt2;
int main() {
  cin >> str;
  for (int i = 0; i < str.size(); i++) str[i] == 'o' ? cnt1++ : cnt2++;
  puts(cnt1 == 0 || cnt2 % cnt1 == 0 ? "YES" : "NO");
  return 0;
}
