#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4")
#pragma GCC optimize("unroll-loops")
using namespace std;
const int maxn = 1e6 + 10;
template <class T>
T mymin(const T a, const T b) {
  return a < b ? a : b;
}
template <class T>
T mymax(const T a, const T b) {
  return a > b ? a : b;
}
string s;
int main() {
  ios::sync_with_stdio(false);
  cin >> s;
  int cntl, cntp;
  cntl = cntp = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-')
      cntl++;
    else
      cntp++;
  }
  if (cntl == 0 || cntp <= 1) {
    cout << "Yes" << endl;
    exit(0);
  }
  if (cntl % cntp == 0) {
    cout << "Yes" << endl;
  } else
    cout << "No" << endl;
  return 0;
}
