Problem: A necklace can be described as a string of links ('-') and pearls ('o'), with the last link or pearl connected to the first one.

<image>

You can remove a link or a pearl and insert it between two other existing links or pearls (or between a link and a pearl) on the necklace. This process can be repeated as many times as you like, but you can't throw away any parts.

Can you make the number of links between every two adjacent pearls equal? Two pearls are considered to be adjacent if there is no other pearl between them.

Note that the final necklace should remain as one circular part of the same length as the initial necklace.

Input

The only line of input contains a string s (3 ≤ |s| ≤ 100), representing the necklace, where a dash '-' represents a link and the lowercase English letter 'o' represents a pearl.

Output

Print "YES" if the links and pearls can be rejoined such that the number of links between adjacent pearls is equal. Otherwise print "NO".

You can print each letter in any case (upper or lower).

Examples

Input

<span class="tex-font-style-tt">-o-o--</span>

Output

YES

Input

<span class="tex-font-style-tt">-o---</span>


Output

YES

Input

<span class="tex-font-style-tt">-o---o-</span>


Output

NO

Input

ooo


Output

YES

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int largest(long long int arr[], long long int n) {
  return *max_element(arr, arr + n);
}
long long int lcm(long long int a, long long int b) {
  return (a * b) / gcd(a, b);
}
long long int power(long long int x, unsigned long long int y) {
  long long int temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else {
    if (y > 0)
      return x * temp * temp;
    else
      return (temp * temp) / x;
  }
}
bool comp(int a, int b) { return (a < b); }
void divisors(long long int n) {
  vector<long long int> v;
  for (int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        v.push_back(i);
      else
        v.push_back(i);
      v.push_back(n / i);
    }
  }
}
bool isPrime(long long int n) {
  if (n <= 1) return false;
  for (long long int i = 2; i < n; i++)
    if (n % i == 0) return false;
  return true;
}
int gcdofarray(vector<long long int> v, long long int n) {
  long long int result = v[0];
  for (long long int i = 1; i < n; i++) result = gcd(v[i], result);
  return result;
}
void factors(long long int n) {
  vector<long long int> v;
  while (n % 2 == 0) {
    cout << 2 << " ";
    n = n / 2;
  }
  for (long long int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      v.push_back(i);
      n = n / i;
    }
  }
  if (n > 2) v.push_back(n);
}
bool powertwo(long long int x) { return x && (!(x & (x - 1))); }
void solve() {
  string str;
  cin >> str;
  long long int i;
  long long int c = 0, d = 0;
  for (i = 0; str[i]; i++) {
    if (str[i] == '-') {
      c++;
    }
    if (str[i] == 'o') {
      d++;
    }
  }
  if (d == 0) {
    cout << "YES";
    return;
  }
  if (c % d == 0) {
    cout << "YES"
         << "\n";
  } else {
    cout << "NO"
         << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  solve();
}