#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int a = 0, b = 0;
  for (int i = 0; i < s.size(); i++) s[i] == '-' ? (b++) : (a++);
  if (a < 2)
    return cout << "YES", 0;
  else if (b % a == 0)
    return cout << "YES", 0;
  else
    return cout << "NO", 0;
}
