#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200010;
const int INF = 0x3f3f3f3f;
const double EPS = 1e-9;
int n, m;
int a[MAXN];
string s;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++)
    if (s[i] == 'o')
      n++;
    else
      m++;
  if (n == 0)
    puts("YES");
  else if (m % n == 0)
    puts("YES");
  else
    puts("NO");
  return 0;
}
