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;
bool prime[100050 + 1];
void sieve1() {
  for (int i = 0; i <= 100050; i++) prime[i] = 1;
  prime[0] = prime[1] = 0;
  for (long long int i = 4; i <= 100050; i += 2) prime[i] = 0;
  for (int p = 3; p * p <= 100050; p += 2) {
    if (prime[p] == 1)
      for (int i = p * 2; i <= 100050; i += p) {
        prime[i] = 0;
      }
  }
}
bool isvowel(char x) {
  return (x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u');
}
long long int mceil(long long int a, long long int b) {
  if (a % b == 0)
    return (a / b);
  else
    return (a / b + 1);
}
long long int mfloor(long long int a, long long int b) { return (a / b); }
long long int sumarr(long long int a[], long long int n) {
  long long int sum = 0;
  for (long long int i = 0; i < n; i++) sum += a[i];
  return sum;
}
long long modmullong(long long a, long long b) {
  long long res = 0;
  a %= 10000000019;
  while (b) {
    if (b & 1) res = (res + a) % 10000000019;
    a = (2 * a) % 10000000019;
    b >>= 1;
  }
  return res;
}
long long modmul(long long a, long long b) {
  return ((a % 10000000019) * (b % 10000000019)) % 10000000019;
}
long long modmul2(long long a, long long b) {
  return (((a % (10000000019 - 1)) * (b % (10000000019 - 1))) %
          (10000000019 - 1));
}
long long modadd(long long a, long long b) {
  return ((a % 10000000019) + (b % 10000000019) + 10000000019) % 10000000019;
}
long long modsub(long long a, long long b) {
  return ((a % 10000000019) - (b % 10000000019) + 10000000019) % 10000000019;
}
long long int fastexpo(long long int a, long long int b) {
  a = a % 10000000019;
  long long int ans = 1;
  while (b) {
    if (b & 1) ans = (ans * 1ll * a) % 10000000019;
    a = (a * 1ll * a) % 10000000019;
    b = b / 2;
  }
  return ans;
}
long long int cntbits(long long int n) {
  long long int cnt = 0;
  while (n) {
    cnt++;
    n /= 2;
  }
  return cnt;
}
void chandan1() {
  int y = 1;
  return;
}
void chandan2() {
  for (long long int i = 0; i < 10; i++) {
    long long int x = 1;
  }
  return (chandan1());
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  chandan2();
  while (t--) {
    string s;
    cin >> s;
    long long int pearl = 0, link = 0;
    for (auto xt : s)
      if (xt == 'o')
        pearl++;
      else
        link++;
    if (pearl == 0 or link % pearl == 0)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}