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

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 \leq |s| \leq 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
-o-o--
Output
YES
Input
-o---

Output
YES
Input
-o---o-

Output
NO
Input
ooo

Output
YES

Difficulty: interview

Starter code:

Solutions:
def main():
    s = input()
    links = s.count('-')
    pearls = s.count('o')
    if pearls == 0 or links % pearls == 0:
        print('YES')
    else:
        print('NO')

main()


s = input()
a = s.count('o')
b = s.count('-')
if (a == 0):
    print('YES')
elif b % a == 0:
    print("YES")
else:
    print("NO")


s = input()

a = s.count('-')
b = s.count('o')

if(b == 0 or a % b == 0):
    print("YES")
else:
    print("NO")


s=input()
b=s.count('o')
n=s.count('-')
if n==0 or b==0:
    print('YES')
else:
    if n%b==0:
        print('YES')
    else:
        print('NO')

s = input()
x = s.count('o')
y = s.count('-')
if x == 0 or y == 0:
    print('YES')
else:
    print('YES' if y % x == 0 else 'NO')

chain = input()
pearls = chain.count('o')
elements = chain.count('-')
if pearls == 0:
    print ('YES')
elif (elements%pearls)==0:
    print ('YES')
else:
    print ('NO')


s = input()
no = s.count('o')
if no == 0:
    print('YES')
    return
nt = len(s) - no
if nt % no == 0:
    print('YES')
else:
    print('NO')

s = input()
t = s.count('o')
c = s.count('-')
if (t == 0 or c % t == 0):
    print("YES")
else:
    print("NO")

s = input()
o = s.count('o')
p = s.count('-')
if o == 0:
    print('YES')
    return
if p % o == 0:
    print('YES')
else:
    print('NO')

from collections import Counter

s = input()

c = Counter(s)

if c['o'] == 0:
    print("YES")
else:
    print("YES" if c['-']%c['o'] == 0 else "NO")

s = input()
c1 = s.count('-')
c2 = s.count('o')
if c2 == 0 or (c2 != 0 and c1 % c2 == 0):
    print("YES")
else:
    print("NO")


def go():
    s = input()
    p = s.count('o')
    l = s.count('-')

    if p == 0:
        return 'YES'
    if l % p == 0:
        return 'YES'
    return 'NO'
print(go())


s = input()
p = len([char for char in s if char == 'o'])
l = len([char for char in s if char == '-'])
if p == 0 or l % p == 0:
	print('YES')
else:
	print('NO')

'''input
---
'''
def ii():
	return int(input())
def ai():
	return map(int,input().split())
s = input()
p = s.count('-')
f = s.count('o')
if f is 0:
	print("YES")
	return
if p % f == 0 :
	print("YES")
else:
	print("NO")

c1 = c2 = 0
for i in input():
    if i == 'o':
        c2+=1
    else:
        c1+=1
if c2 == 0:
    print("YES")
elif c1%c2:
    print("NO")
else:
    print("YES")

s = input()

x = s.count('o')
y = len(s) - x

if (x <= 1):
    print("YES")
else:
    if (y % x == 0):
        print("YES")
    else:
        print("NO")

from sys import stdin, stdout

def main():
    s = input()
    p = sum([x == 'o' for x in s])
    l = sum([x == '-' for x in s])

    if p == 0 or l % p == 0:
        print('YES')
    else:
        print('NO')




main()


def ii():
    return int(input())
def mi():
    return map(int, input().split())
def li():
    return list(mi())

s = input().strip()
a = s.count('-')
b = s.count('o')
if b:
    print('YES' if a % b == 0 else 'NO')
else:
    print('YES')

s = input().strip()

pearls = s.count("o")
links = s.count("-")

if not pearls or links % pearls == 0:
    print('YES')
else:
    print('NO')


from collections import Counter
nl = Counter(input())
print('YES' if len(nl) == 1 or nl['-'] % nl['o'] == 0 else 'NO')