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: EASY
Tags: Mathematics

Implementation

Starter code:

Solutions:
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')


s = str(input())
links = 0
for i in range(len(s)):
	if s[i] == '-':
		links += 1
pearls = len(s) - links
if pearls == 0:
	print('YES')
elif links % pearls == 0:
	print('YES')
else:
	print('NO')


s = input()
a = [0, 0]
for i in s:
	if i == 'o':
		a[0] += 1
	else:
		a[1] += 1
if a[0] % 2 == 0 and a[0] >= 2:
	if a[1] % a[0] == 0 and (a[1] >= a[0] or a[1] == 0):
		print('YES')
	else:
		print('NO')
elif a[0] % 2 == 1 and a[0] >= 2:
	if a[1] % a[0] == 0 and (a[1] >= a[0] or a[1] == 0):
		print('YES')
	else:
		print('NO')
else:
	print('YES' if a[0] < 2 else 'NO')


s = input()
c = 0
for i in range(len(s)):
	if s[i] == 'o':
		c += 1
n = len(s) - c
if c == 0:
	print('YES')
elif n % c == 0:
	print('YES')
else:
	print('NO')


s = input()
n = 0
m = 0
for c in s:
	if c == 'o':
		n += 1
	else:
		m += 1
if n == 0:
	print('YES')
elif m % n == 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()
sl = [i for i in s]
a = sl.count('o')
b = len(s) - a
if not a or b % a == 0:
	print('YES')
else:
	print('NO')


s = input()
o = s.count('o')
l = s.count('-')
if l == 0 or o == 0:
	print('YES')
elif l < o:
	print('NO')
elif l % o == 0:
	print('YES')
else:
	print('NO')


string = input()
countO = 0
countStripe = 0
for i in string:
	if i == 'o':
		countO += 1
	if i == '-':
		countStripe += 1
if countO == 0:
	print('YES')
elif countStripe % countO == 0:
	print('YES')
else:
	print('NO')


s = list(input())
p = 0
n = len(s)
for i in range(len(s)):
	if s[i] == 'o':
		p += 1
if n == p or p == 0:
	print('YES')
elif (n - p) % p == 0:
	print('YES')
else:
	print('NO')


from collections import Counter
x = input().rstrip()
c = Counter(x)
print('YES' if c['o'] == 0 or c['-'] % c['o'] == 0 else 'NO')


s = input()
met = 0
gauge = 0
for i in range(len(s)):
	if s[i] == '-':
		met += 1
	else:
		gauge += 1
if gauge == 0:
	print('YES')
elif met % gauge == 0:
	print('YES')
else:
	print('NO')


s = input('')
l = 0
m = 0
for i in range(0, len(s)):
	if s[i] == '-':
		l += 1
	else:
		m += 1
if l == 0 or m == 0:
	print('YES')
elif l % m == 0:
	print('YES')
else:
	print('NO')


k = input()
a = k.count('-')
b = k.count('o')
if b != 0:
	if a == 0 or a % b == 0:
		print('Yes')
	else:
		print('No')
else:
	print('Yes')


s = input()
(circle, minus) = (0, 0)
for let in s:
	if let == '-':
		minus += 1
	else:
		circle += 1
if not circle or minus % circle == 0:
	print('YES')
else:
	print('NO')


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


a = input()
print('YNEOS'[len(a) % max(a.count('o'), 1) > 0::2])


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


s = input()
st = s.count('-')
ba = s.count('o')
if st % max(ba, 1) == 0:
	print('YES')
else:
	print('NO')


st = list(input())
co_o = st.count('o')
co_l = st.count('-')
if co_o == 0:
	print('YES')
	exit()
if co_l % co_o == 0:
	print('YES')
else:
	print('NO')


a = input()
x = a.count('o') if a.count('o') != 0 else 1
print('Yes' if a.count('-') % x == 0 else 'No')


n = input()
p = n.count('-')
q = n.count('o')
if p >= 0 and q > 0:
	if p % q == 0:
		print('YES')
	else:
		print('NO')
if q == 0:
	print('YES')


from collections import Counter
d = Counter(input())
print('NO' if d['o'] and d['-'] % d['o'] else 'YES')


s = input()
pearls = 0
links = 0
for c in s:
	if c == 'o':
		pearls += 1
	else:
		links += 1
if pearls == 0 or links % pearls == 0:
	print('yes')
else:
	print('no')


str = input()
countBus = 0
countNit = 0
for i in str:
	if i == '-':
		countNit += 1
	elif i == 'o':
		countBus += 1
if countBus == 0 or countNit % countBus == 0:
	print('YES')
else:
	print('NO')


def main():
	neck = input()
	count1 = neck.count('-')
	count2 = neck.count('o')
	if count1 == 0 or count2 == 0:
		print('YES')
	elif count1 % count2 == 0:
		print('YES')
	else:
		print('NO')
main()


s = input()
o = s.count('o')
print('NO' if o and len(s) % o else 'YES')


s = input()
p = 0
l = 0
for i in s:
	if i == '-':
		l += 1
	else:
		p += 1
if p == 0 or l % p == 0:
	print('YES')
else:
	print('NO')


def solve():
	o = s.count('o')
	l = len(s) - o
	return 'YES' if not o or l % o == 0 else 'NO'

def main():
	global s
	s = input()
	print(solve())
main()


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


a = list(input())
ct = a.count('o')
if ct == 0 or int(len(a) - ct) % ct == 0:
	print('YES')
else:
	print('NO')


l = list(input())
a = l.count('-')
b = l.count('o')
if b != 0 and a % b == 0 or b == 0:
	print('YES')
else:
	print('NO')


inp = input()
if not inp.count('o'):
	print('YES')
	exit(0)
if inp.count('-') % inp.count('o') == 0:
	print('YES')
else:
	print('NO')


s = input()
nit = 0
bus = 0
for i in range(len(s)):
	if s[i] == '-':
		nit += 1
	else:
		bus += 1
if bus <= 1:
	print('YES')
elif nit % bus == 0:
	print('YES')
else:
	print('NO')


i = input()
print('YES' if i.count('o') == 0 or i.count('-') % i.count('o') == 0 else 'NO')


n = 0
o = 0
for symbol in input():
	if symbol == '-':
		n += 1
	else:
		o += 1
try:
	if int(n / o) == float(n / o):
		print('YES')
	else:
		print('NO')
except ZeroDivisionError:
	print('YES')


st = input()
l = len(st)
q = 0
b = 0
for i in range(l):
	if st[i] == 'o':
		q = q + 1
	else:
		b = b + 1
if q == 0:
	q = 1
if q != 0:
	if b % q == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


x = input()
if 'o' not in x:
	print('YES')
elif '-' not in x:
	print('YES')
elif x.count('o') == 1:
	print('YES')
elif x.count('-') % x.count('o') == 0:
	print('YES')
else:
	print('NO')


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


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


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


s = input().strip()
n = d = 0
for c in s:
	if c == 'o':
		n += 1
	else:
		d += 1
print('YES' if min(d, n) == 0 or d % n == 0 else 'NO')


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


a = input()
b = a.count('-')
c = len(a) - b
if c != 0 and b % c:
	print('NO')
else:
	print('YES')


s = input()
a = s.count('o')
print('NO' if a > 0 and (len(s) - a) % a != 0 else 'YES')


a = input()
lace = a.count('-')
if lace == len(a):
	print('YES')
elif lace % (len(a) - lace) == 0:
	print('YES')
else:
	print('NO')


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


def read():
	return list(map(int, input().split()))
s = input()
kb = s.count('o')
kn = s.count('-')
if kb == 0:
	print('YES')
	exit()
if kn % kb == 0:
	print('YES')
else:
	print('NO')


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


necklace = input()
pearls = necklace.count('o')
links = necklace.count('-')
print('YES' if pearls == 0 or links % pearls == 0 else 'NO')


s = input()
c = 0
l = 0
for i in s:
	if i == 'o':
		c += 1
	else:
		l += 1
if c != 0 and l % c == 0:
	print('YES')
elif c == 0:
	print('YES')
else:
	print('NO')


s = str(input())
a = 0
b = 0
for i in s:
	if i == '-':
		a += 1
	else:
		b += 1
if b > 0:
	if a % b == 0:
		print('YES')
	else:
		print('NO')
else:
	print('YES')


import time
string = input('')
links = 0
pearls = 0
for i in string:
	if i == 'o':
		pearls += 1
	if i == '-':
		links += 1
if links == 0:
	print('YES')
elif links < pearls:
	print('NO')
elif pearls == 0:
	print('YES')
elif links % pearls == 0:
	print('YES')
else:
	print('NO')


s = input()
(cnt1, cnt2) = (0, 0)
for x in s:
	if x == '-':
		cnt1 += 1
	else:
		cnt2 += 1
if cnt2 == 0 or cnt1 % cnt2 == 0:
	print('YES')
else:
	print('NO')


get_input = input()
link = 0
pearl = 0
for i in get_input:
	if i == 'o':
		pearl += 1
	elif i == '-':
		link += 1
if pearl == 0 or link == 0:
	print('YES')
	exit()
elif link % pearl == 0:
	print('YES')
	exit()
else:
	print('NO')


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


a = list(input())
b = a.count('-')
c = a.count('o')
if c == 0 or b % c == 0:
	print('YES')
else:
	print('NO')


s = list(input())
nd = s.count('-')
np = s.count('o')
if np == 0 or nd % np == 0:
	print('YES')
else:
	print('NO')


data = input()
n_nodes = sum(map(lambda c: c == 'o', data))
n_links = len(data) - n_nodes
print(('NO', 'YES')[n_nodes == 0 or n_links % n_nodes == 0])


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


I = lambda : int(input())
IL = lambda : list(map(int, input().split()))
s = input()
(p, l) = (s.count('o'), s.count('-'))
print('YES' if l % max(p, 1) == 0 else 'NO')


a = list(input())
q = a.count('o')
w = a.count('-')
if q > 0 and w % q == 0:
	print('YES')
elif q == 0 or w == 0:
	print('YES')
else:
	print('NO')


x = str(input())
list = [0, 0]
i = 0
while i < len(x):
	if x[i] == 'o':
		list[0] = list[0] + 1
	else:
		list[1] = list[1] + 1
	i += 1
if list[0] == 0 or list[1] == 0:
	print('YES')
elif list[1] % list[0] == 0:
	print('YES')
else:
	print('NO')


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


line = input()
(x, y) = (line.count('-'), line.count('o'))
if y > 0 and x % y == 0 or y == 0:
	print('yes')
else:
	print('no')


n = input()
numMinus = 0
numO = 0
for i in range(0, len(n)):
	if n[i] == 'o':
		numO += 1
	else:
		numMinus += 1
if numO != 0:
	if numMinus % numO == 0:
		print('YES')
	else:
		print('NO')
else:
	print('YES')


s = input()
n = 0
m = 0
for l in s:
	if l == '-':
		n += 1
	else:
		m += 1
if m == 0 or n % m == 0:
	print('YES')
else:
	print('NO')


lst = list(input())
b = 0
n = 0
for i in range(len(lst)):
	if lst[i] == 'o':
		b += 1
	elif lst[i] == '-':
		n += 1
if b == n:
	print('YES')
elif b == 1:
	print('YES')
elif n == 0:
	print('YES')
elif b == 0:
	print('YES')
elif n % b == 0:
	print('YES')
else:
	print('NO')


s = [x for x in input().lower()]
b = s.count('o')
v = s.count('-')
if b == 0 or v % b == 0:
	print('YES')
else:
	print('NO')


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')


n = list(input())
x = n.count('-')
z = n.count('o')
if z != 0 and x % z == 0:
	print('YES')
elif z == 0:
	print('YES')
else:
	print('NO')


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


import sys
import math
import cmath
import collections
import random

def main():
	s = input()
	(a, b) = (0, 0)
	for i in range(len(s)):
		if s[i] == 'o':
			b += 1
		else:
			a += 1
	if b == 0:
		print('YES')
	elif a % b == 0:
		print('YES')
	else:
		print('NO')
main()


data = input('')
s = 0
p = 0
for i in range(0, len(data)):
	if data[i] == '-':
		s += 1
	else:
		p += 1
if s == 0 or p == 0 or s % p == 0:
	print('YES')
else:
	print('NO')


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


s = input()
pearls = s.count('o')
print('NO' if pearls and s.count('-') % pearls else 'YES')


L = input()
a = 0
b = 0
for c in L:
	if c == 'o':
		a += 1
	else:
		b += 1
if a == 0 or b % a == 0:
	print('YES')
else:
	print('NO')


import sys
from collections import Counter
s = next(sys.stdin).rstrip()
counter = Counter(s)
num_pearls = counter['o']
num_links = counter['-']
if num_pearls == 0 or num_links % num_pearls == 0:
	print('YES')
else:
	print('NO')


from sys import stdin, stdout
s = stdin.readline()
l = s.count('-')
o = s.count('o')
if l == 0 or o == 0:
	print('YES')
elif l % o == 0:
	print('YES')
else:
	print('NO')


import sys
import math
import bisect
import itertools

def main():
	n = 0
	m = 0
	for c in input():
		if c == 'o':
			n += 1
		elif c == '-':
			m += 1
	if n == 0:
		print('YES')
	elif m % n == 0:
		print('YES')
	else:
		print('NO')
main()


n = input()
el = n.count('o')
tmp = n.count('-')
if el == 0:
	print('YES')
elif tmp % el == 0:
	print('YES')
else:
	print('NO')


from math import gcd
s = input()
(a, b) = (0, 0)
for i in range(len(s)):
	if s[i] == '-':
		a += 1
	else:
		b += 1
mi = min(a, b)
if mi > 0 and a >= b:
	if gcd(a, b) == mi:
		print('YES')
	else:
		print('NO')
elif a == 0 or b == 0:
	print('YES')
else:
	print('NO')


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


str = input()
link = 0
pearl = 0
for i in str:
	if i == '-':
		link += 1
	else:
		pearl += 1
if pearl == 0:
	print('YES')
else:
	print('YES' if link % pearl == 0 else 'NO')


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')


inp = input().strip()
print('YES' if inp.count('o') == 0 or inp.count('-') % inp.count('o') == 0 else 'NO')


s = str(input())
link = []
pearl = []
for i in s:
	if i == '-':
		link.append(i)
	else:
		pearl.append(i)
l = len(link)
p = len(pearl)
if p == 0:
	print('YES')
elif l % p == 0:
	print('YES')
else:
	print('NO')


s = input()
a = 0
b = 0
for i in s:
	if i == '-':
		b += 1
	elif i == 'o':
		a += 1
if a == 0:
	print('YES')
elif b % a == 0:
	print('YES')
else:
	print('NO')


s = input()
count_dash = 0
count_pearl = 0
for i in s:
	if i == '-':
		count_dash += 1
	else:
		count_pearl += 1
if count_pearl == 0:
	print('Yes')
	quit()
if count_dash % count_pearl == 0:
	print('Yes')
else:
	print('No')


s = input()
n = 0
b = 0
for i in s:
	if i == 'o':
		b += 1
	else:
		n += 1
if b == 0 or n % b == 0:
	print('YES')
else:
	print('NO')


n = input()
k = s = 0
for i in n:
	if i == '-':
		k += 1
	else:
		s += 1
if k == 0:
	print('yes')
	exit()
elif s == 0:
	print('yes')
	exit()
elif k % s == 0:
	print('yes')
	exit()
print('no')


string = input()
link = string.count('-')
pearl = len(string) - link
if pearl == 0 or (pearl > 0 and link % pearl == 0):
	print('YES')
else:
	print('NO')


s = input()
if s.count('o') == 0 or s.count('-') % s.count('o') == 0:
	print('yes')
else:
	print('no')


S = input()
pcnt = lcnt = 0
for s in S:
	if s == 'o':
		pcnt += 1
	else:
		lcnt += 1
if pcnt == 0 or lcnt == 0:
	print('YES')
elif lcnt % pcnt:
	print('NO')
else:
	print('YES')


s = input()
n = len(s)
link = 0
perl = 0
for i in range(0, n):
	if s[i] == 'o':
		perl += 1
	else:
		link += 1
if perl == 0 or link % perl == 0:
	print('YES')
else:
	print('NO')


a = input()
cnt = a.count('-')
if cnt == len(a):
	print('YES')
elif cnt % (len(a) - cnt):
	print('NO')
else:
	print('YES')


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


S = list(input())
H = S.count('o')
H1 = S.count('-')
if H1 == 0 or H == 0:
	print('YES')
else:
	j = 0
	if H > H1:
		j = 1
	elif H1 > H:
		if H1 % H != 0:
			j = 1
	if j == 1:
		print('NO')
	else:
		print('YES')


s = input()
dash = s.count('-')
ring = s.count('o')
k = min(dash, ring)
m = max(dash, ring)
if dash == 0 or ring == 0:
	print('YES')
elif dash % ring == 0:
	print('YES')
else:
	print('NO')


s = input()
dash = 0
pearl = 0
for e in s:
	if e == 'o':
		pearl += 1
	else:
		dash += 1
if pearl == 0 or dash == 0:
	print('YES')
	exit(0)
if dash % pearl == 0:
	print('YES')
else:
	print('NO')


line = input()
if not line.count('o'):
	print('YES')
elif line.count('-') % line.count('o') == 0:
	print('YES')
else:
	print('NO')


string = input()
links = [x for x in string if x == '-']
pearls = [x for x in string if x == 'o']
nl = len(links)
np = len(pearls)
if np == 0:
	print('YES')
elif (nl / np).is_integer():
	print('YES')
else:
	print('NO')


s = input()
cnt1 = 0
for i in s:
	if i == 'o':
		cnt1 += 1
if cnt1 == 0:
	print('YES')
	exit(0)
if (len(s) - cnt1) % cnt1 == 0:
	print('YES')
else:
	print('NO')


s = input().strip()
(mn, no) = (s.count('-'), s.count('o'))
if mn == 0 or no == 0 or mn % no == 0:
	print('YES')
else:
	print('NO')


def mp():
	return map(int, input().split())
a = input()
n = a.count('o')
m = a.count('-')
if n == 1 or n == 0 or m == 0 or (m % n == 0):
	print('YES')
else:
	print('NO')


n = input()
lengg = len(n)
p = 0
q = 0
for i in range(lengg):
	if n[i] == '-':
		p += 1
	else:
		q += 1
if q == 0:
	print('YES')
elif p % q == 0:
	print('YES')
else:
	print('NO')


s = input()
co = s.count('o')
cd = s.count('-')
if co <= 1:
	print('YES')
elif cd % co == 0:
	print('YES')
else:
	print('NO')


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


def read():
	return int(input())

def readlist():
	return list(map(int, input().split()))

def readmap():
	return map(int, input().split())

def solve(S):
	pearl = S.count('o')
	link = S.count('-')
	if pearl == 0:
		return 'YES'
	elif link % pearl == 0:
		return 'YES'
	else:
		return 'NO'
S = input()
print(solve(S))


string = input()
x = string.count('o')
y = string.count('-')
if x == 0:
	print('yes')
	exit()
if y % x == 0:
	print('yes')
else:
	print('no')


s = input()
d = 0
p = 0
for i in s:
	if i == '-':
		d += 1
	else:
		p += 1
if p == 0:
	print('YES')
	quit()
if d % p == 0:
	print('YES')
else:
	print('NO')


import sys
import io
stream_enable = 0
inpstream = '\n-o-o--\n'
if stream_enable:
	sys.stdin = io.StringIO(inpstream)
	input()

def inpmap():
	return list(map(int, input().split()))
a = input()
b = len(a)
c = a.count('o')
if c == 0:
	print('YES')
elif b % c == 0:
	print('YES')
else:
	print('NO')


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


L = list(input())
count1 = 0
count2 = 0
for i in L:
	if i == '-':
		count1 += 1
	else:
		count2 += 1
if count1 == 0 or count2 == 0:
	print('Yes')
elif count1 % count2 == 0:
	print('Yes')
else:
	print('No')


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


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


x = input()
oC = x.count('o')
sC = x.count('-')
if oC == 0 and sC == 0:
	print('No')
elif oC == 0 or sC == 0:
	print('Yes')
elif not sC % oC:
	print('Yes')
else:
	print('No')


from sys import stdin

def solve(tc):
	s = stdin.readline().strip()
	link = 0
	pearl = 0
	for c in s:
		if c == '-':
			link += 1
		else:
			pearl += 1
	if link == 0 or pearl == 0 or link % pearl == 0:
		print('YES')
	else:
		print('NO')
LOCAL_TEST = not __debug__
if LOCAL_TEST:
	infile = __file__.split('.')[0] + '-test.in'
	stdin = open(infile, 'r')
tcs = int(stdin.readline().strip()) if LOCAL_TEST else 1
tc = 1
while tc <= tcs:
	solve(tc)
	tc += 1


s = str(input())
num = s.count('-')
denom = s.count('o')
if denom == 0:
	denom = 1
if num % denom == 0:
	print('YES')
else:
	print('NO')


s = input()
print(('NO', 'YES')[not len(s) % (s.count('o') or 1)])


a = input()
t = a.count('o')
r = len(a) - t
if t == 0:
	print('YES')
elif r % t == 0:
	print('YES')
else:
	print('NO')


s = input()
print('Yes' if s.count('o') == 0 or s.count('-') % s.count('o') == 0 else 'No')


x = input()
c = 0
d = 0
for i in range(len(x)):
	if x[i] == '-':
		c = c + 1
	else:
		d = d + 1
if c == 0 or d == 0:
	print('YES')
elif c % d == 0 and c >= d:
	print('YES')
else:
	print('NO')


necklace = input()
perl_count = necklace.count('o')
link_count = len(necklace) - perl_count
if perl_count == 0 or link_count % perl_count == 0:
	print('YES')
else:
	print('NO')


import sys

def main():
	t = sys.stdin.readline().strip()
	length = len(t)
	nb_p = t.count('o')
	nb_l = length - nb_p
	if not (nb_l and nb_p):
		print('YES')
		return
	if nb_l % nb_p == 0:
		print('YES')
	else:
		print('NO')
main()


s = input()
c1 = 0
c2 = 0
for t in s:
	if t == 'o':
		c1 += 1
	elif t == '-':
		c2 += 1
if not c1 or not c2 % c1:
	print('YES')
else:
	print('NO')


a = input()
links = a.count('-')
pearls = a.count('o')
if links == 0 or pearls == 0:
	print('YES')
elif links % pearls == 0:
	print('YES')
else:
	print('NO')


s = input()
N = [0]
for (i, c) in enumerate(s):
	if c == 'o':
		N.append(0)
	else:
		N[-1] += 1
if len(N) > 1:
	N[0] += N.pop()
if sum(N) % len(N) == 0:
	print('YES')
else:
	print('NO')


s = input()
dashes = s.count('-')
dots = s.count('o')
if dots != 0:
	if dashes % dots == 0:
		print('YES')
	else:
		print('NO')
else:
	print('YES')


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


string = input()
pearl = link = 0
for c in string:
	if c == '-':
		link += 1
	else:
		pearl += 1
if pearl == 0 or link % pearl == 0:
	print('YES')
else:
	print('NO')


s = input()
perls = s.count('o')
links = s.count('-')
print('YES' if perls == 0 or links % perls == 0 else 'NO')


def Links_and_Pearls(array):
	a = 0
	b = 0
	i = 0
	while i < len(array):
		if array[i] == 'o':
			a = a + 1
		else:
			b = b + 1
		i = i + 1
	if a == 0:
		print('YES')
	elif b % a == 0:
		print('YES')
	else:
		print('NO')
array = input()
Links_and_Pearls(array)


ch = input()
o = ch.count('o')
matta = ch.count('-')
if o == 0:
	print('YES')
elif matta % o == 0:
	print('YES')
else:
	print('NO')


import sys
s = list(input())
(l, b) = (0, 0)
for i in range(len(s)):
	if s[i] == '-':
		l += 1
	else:
		b += 1
if b == 0:
	print('YES')
	sys.exit()
if l % b == 0:
	print('YES')
else:
	print('NO')


class CodeforcesTask980ASolution:

	def __init__(self):
		self.result = ''
		self.necklace = ''

	def read_input(self):
		self.necklace = input()

	def process_task(self):
		try:
			if not self.necklace.count('-') % self.necklace.count('o'):
				self.result = 'YES'
			else:
				self.result = 'NO'
		except ZeroDivisionError:
			self.result = 'YES'

	def get_result(self):
		return self.result
Solution = CodeforcesTask980ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


string = input()
pearl = string.count('o')
link = string.count('-')
if pearl == 0 or link == 0:
	print('YES')
elif pearl > link:
	print('NO')
elif link % pearl == 0:
	print('YES')
else:
	print('NO')


s = input()
l = 0
p = 0
for c in s:
	if c == '-':
		l += 1
	else:
		p += 1
if p == 0:
	print('YES')
elif l % p == 0:
	print('YES')
else:
	print('NO')


s = input()
slen = len(s)
cnt1 = s.count('o')
cnt2 = slen - cnt1
if cnt1 == 0:
	print('YES')
elif cnt2 % cnt1 == 0:
	print('YES')
else:
	print('NO')


s = input()
if 'o' in s and '-' in s:
	o = s.count('o')
	e = s.count('-')
	if e % o == 0:
		print('YES')
	else:
		print('NO')
else:
	print('YES')


seq = input()
n1 = seq.count('-')
n2 = seq.count('o')
if n2 == 0:
	print('YES')
elif n1 % n2 != 0:
	print('NO')
else:
	print('YES')


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


def main():
	s = input()
	n = sum([1 for c in s if c == '-'])
	m = sum([1 for c in s if c == 'o'])
	res = 'YES' if m == 0 or n % m == 0 else 'NO'
	print(res)
main()


a = list(input())
c = 0
c1 = 0
for i in range(len(a)):
	if a[i] == 'o':
		c += 1
	elif a[i] == '-':
		c1 += 1
if c == 0:
	print('YES')
elif c1 % c == 0:
	print('YES')
else:
	print('NO')


s = input()
kolM = 0
kolB = 0
for el in s:
	if el == 'o':
		kolB += 1
	if el == '-':
		kolM += 1
if kolB != 0 and kolM % kolB == 0 or kolB == 0:
	print('YES')
else:
	print('NO')


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


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


line = input()
num_links = sum((1 for c in line if c == '-'), 0)
num_pearls = sum((1 for c in line if c == 'o'), 0)
if num_pearls == 0 or num_links % num_pearls == 0:
	print('YES')
else:
	print('NO')


links = 0
pearls = 0
for part in input():
	if part == '-':
		links += 1
	else:
		pearls += 1
if pearls != 0:
	print('YES' if not links % pearls else 'NO')
else:
	print('YES')


s = input()
strings = s.count('-')
pearls = s.count('o')
if strings == 0 or pearls == 0:
	print('YES')
elif pearls > strings:
	print('NO')
elif strings % pearls == 0:
	print('YES')
else:
	print('NO')


n = input()
a = 0
b = 0
for i in n:
	if i == '-':
		a += 1
	else:
		b += 1
if b == 0:
	print('YES')
elif a % b == 0:
	print('YES')
else:
	print('NO')


def func():
	S = input()
	L = 0
	P = 0
	for s in S:
		if s == '-':
			L += 1
		else:
			P += 1
	if P == 0:
		return 'YES'
	if abs(L / P - L // P) < 1e-05:
		return 'YES'
	return 'NO'
print(func())


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


s = input()
dash = 0
pearl = 0
for i in range(0, len(s)):
	if s[i] == 'o':
		pearl = pearl + 1
	if s[i] == '-':
		dash = dash + 1
if pearl != 0:
	if dash % pearl == 0:
		print('YES')
	else:
		print('NO')
else:
	print('YES')


string = input()
linkCounter = string.count('-')
pearlCounter = string.count('o')
if pearlCounter == 0:
	print('YES')
elif linkCounter % pearlCounter == 0:
	print('YES')
else:
	print('NO')


X = input()
print('YES' if X.count('o') == 0 or X.count('-') % X.count('o') == 0 else 'NO')


s = list(input())
beads = 0
threads = 0
for x in s:
	if x == 'o':
		beads += 1
	if x == '-':
		threads += 1
if beads == 0:
	print('YES')
elif threads % beads == 0:
	print('YES')
else:
	print('NO')


s = input()
a = [0, 0]
for i in s:
	if i == '-':
		a[0] += 1
	else:
		a[1] += 1
if a[1] == 0 or a[0] % a[1] == 0:
	print('YES')
else:
	print('NO')


x = input()
l = 0
k = 0
for i in x:
	if i == '-':
		l += 1
	else:
		k += 1
if k == 1 or k == 0:
	print('YES')
elif l % k == 0:
	print('YES')
else:
	print('NO')


s = input()
cnt1 = 0
cnt2 = 0
for i in s:
	if i == '-':
		cnt1 += 1
	else:
		cnt2 += 1
if cnt1 == 0 or cnt2 == 0:
	print('YES')
elif cnt1 % cnt2 == 0:
	print('YES')
else:
	print('NO')


s = list(input())
i = s.count('-')
j = s.count('o')
if j == 0 or i / j == i // j:
	print('YES')
else:
	print('NO')


def a480(numO, num_):
	if num_ == 0 or numO == 0:
		return 'YES'
	if num_ % numO == 0:
		return 'YES'
	return 'NO'
s = list(input())
numO = s.count('o')
num_ = s.count('-')
print(a480(numO, num_))


str1 = input()
count1 = 0
count2 = 0
for a in str1:
	if a == '-':
		count1 += 1
	elif a == 'o':
		count2 += 1
if count1 == 0 or count2 == 0:
	print('YES')
elif count1 % count2 == 0:
	print('YES')
else:
	print('NO')


from bisect import bisect_left, bisect_right

def tuple_input(type):
	return map(type, input().strip().split())

def print_list(s):
	print(''.join(map(str, s)))
s = input().strip()
(l, p) = (0, 0)
for e in s:
	if e == '-':
		l += 1
	else:
		p += 1
if p == 0 or (p != 0 and l % p == 0):
	print('YES')
else:
	print('NO')


from collections import Counter
s = input()
x = Counter(s)
pearls = x['o']
links = x['-']
if pearls == 0:
	print('YES')
elif links % pearls == 0:
	print('YES')
else:
	print('NO')


S = input()
o = S.count('o')
_ = S.count('-')
if o == 0 or _ == 0 or _ % o == 0:
	print('YES')
else:
	print('NO')


s = input()
d = 0
o = 0
for i in range(len(s)):
	if s[i] == '-':
		d = d + 1
	else:
		o = o + 1
if d == 0 or o == 0:
	print('YES')
elif d % o == 0:
	print('YES')
else:
	print('NO')


s = input().strip()
length = len(s)
c1 = 0
c2 = 0
for i in range(length):
	if s[i] == '-':
		c2 += 1
	elif s[i] == 'o':
		c1 += 1
if c1 == 0 or c1 == 1:
	print('YES')
elif c2 % c1 == 0:
	print('YES')
else:
	print('NO')


a = input()
if len(a) % (a.count('o') or 1):
	print('NO')
else:
	print('YES')


s = input()
cnt = 0
cntt = 0
for i in s:
	if i == '-':
		cnt += 1
	else:
		cntt += 1
if cntt == 0:
	print('YES')
elif cnt % cntt == 0:
	print('YES')
else:
	print('NO')


s = list(str(input()))
b = s.count('o')
t = len(s) - b
if b == 0:
	print('YES')
elif t % b == 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()
n = 0
b = 0
for c in s:
	if c == '-':
		n = n + 1
	else:
		b = b + 1
if b == 0:
	print('YES')
elif n % b == 0:
	print('YES')
else:
	print('NO')


s = str(input())
countL = 0
countP = 0
for i in range(len(s)):
	if s[i] == '-':
		countL += 1
	else:
		countP += 1
if countP == 0:
	print('YES')
elif countL % countP == 0:
	print('YES')
else:
	print('NO')


string = input()
o = 0
_ = 0
for ch in string:
	if ch == 'o':
		o += 1
	else:
		_ += 1
if o == 0 or o == 1:
	print('YES')
elif _ % o == 0:
	print('YES')
else:
	print('NO')


s = input()
b = s.count('o')
n = s.count('-')
if b == 0:
	print('yes')
	exit()
print('yes' if n % b == 0 else 'no')


n = input()
l = len(n)
x = n.count('o')
if l == x or (l - x) % max(1, x) == 0:
	print('YES')
else:
	print('NO')


x = input()
a = x.count('-')
b = x.count('o')
print('YES' if min(a, b) == 0 or b == 1 or a % b == 0 else 'NO')


s = input()
num = s.count('o')
if num < 2:
	print('YES')
else:
	n = len(s)
	if (n - num) % num != 0:
		print('NO')
	else:
		print('YES')


s = input()
a = s.count('o')
b = s.count('-')
if a != 0:
	x = b / a
	if x - int(x) > 0:
		print('NO')
	else:
		print('YES')
else:
	print('YES')


s = str(input())
pearl = s.count('o')
link = s.count('-')
if link * pearl == 0 or link % pearl == 0:
	print('YES')
else:
	print('NO')


X = input()
link = 0
perl = 0
for e in X:
	if e == 'o':
		perl += 1
	else:
		link += 1
try:
	if link % perl == 0:
		print('YES')
	else:
		print('NO')
except:
	print('YES')


s = input()
l = s.count('-')
p = s.count('o') or 1
print('NO' if l % p else 'YES')


necklace = input()
links = 0
pearls = 0
for i in range(len(necklace)):
	if necklace[i] == '-':
		links += 1
	else:
		pearls += 1
if links == 0 or pearls == 0:
	print('YES')
elif links % pearls == 0:
	print('YES')
else:
	print('NO')


s = input()
mass = []
for i in range(len(s)):
	mass.append(s[i])
if 'o' not in mass or '-' not in mass or mass.count('o') == 1:
	print('YES')
elif mass.count('-') < mass.count('o') or mass.count('-') % mass.count('o') != 0:
	print('NO')
else:
	print('YES')


s = input()
o = 0
l = 0
for i in range(len(s)):
	if s[i] == 'o':
		o += 1
	else:
		l += 1
if o != 0:
	if l % o != 0:
		print('NO')
	else:
		print('YES')
else:
	print('YES')


necklace = list(input())
d = {'-': 0, 'o': 0}
for element in necklace:
	d[element] += 1
if d['o'] == 0 or d['-'] % d['o'] == 0:
	print('YES')
else:
	print('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')


str = input()
pearls = str.count('o')
links = str.count('-')
if links == 0 or pearls <= 1 or links % pearls == 0:
	print('YES')
else:
	print('NO')


s = input()
n = len(s)
pearls = 0
dash = 0
for i in s:
	if i == 'o':
		pearls += 1
	else:
		dash += 1
if pearls == 0:
	print('yes')
else:
	for j in range(n):
		if pearls * j == dash:
			print('yes')
			break
		elif pearls * j > n:
			print('no')
			break


s = input()
threads = beads = 0
for i in s:
	if i == '-':
		threads = threads + 1
	elif i == 'o':
		beads = beads + 1
if beads != 0:
	if threads % beads == 0:
		print('YES')
	else:
		print('NO')
else:
	print('YES')


def f(l):
	nl = sum([c == '-' for c in l])
	np = sum([c == 'o' for c in l])
	if np == 0:
		return True
	return nl % np == 0
l = list(input())
print('YES' if f(l) else 'NO')


b = 0
n = 0
for x in input():
	if x == '-':
		n += 1
	if x == 'o':
		b += 1
if b == 0:
	print('YES')
elif n % b == 0:
	print('YES')
else:
	print('NO')


s = input()
l = s.count('-')
p = len(s) - l
if p == 0 or l % p == 0:
	print('YES')
else:
	print('NO')


tr = input()
if 'o' not in tr or '-' not in tr:
	print('YES')
else:
	countO = tr.count('o')
	count_ = tr.count('-')
	if count_ % countO == 0:
		print('YES')
	else:
		print('NO')


s = input().strip()
l = len(s)
p = s.count('-')
q = l - p
if q == 0:
	print('YES')
elif p % q == 0:
	print('YES')
else:
	print('NO')


s = input()
(a, b) = (0, 0)
for i in range(len(s)):
	if s[i] == '-':
		a += 1
	else:
		b += 1
if b == 0 or a == 0:
	print('YES')
	exit()
if a % b == 0:
	print('YES')
	exit()
print('NO')


import itertools

def main():
	n = input()
	bc = len([d for d in n if d == 'o'])
	nc = len([d for d in n if d == '-'])
	if bc != 0:
		print('YES' if nc % bc == 0 else 'NO')
	else:
		print('YES')
main()


li = [char for char in input()]
l = 0
p = 0
for x in li:
	if x == '-':
		l += 1
	else:
		p += 1
if p == 0:
	print('YES')
	exit(0)
if l % p == 0:
	print('YES')
else:
	print('NO')


s = input()
ls = len(s)
ac = 0
bc = 0
for i in range(ls):
	if s[i] == 'o':
		ac += 1
	elif s[i] == '-':
		bc += 1
if ac == 0:
	print('YES')
elif bc % ac == 0:
	print('YES')
else:
	print('NO')


l = list(input())
if l.count('-') == 0:
	print('YES')
	exit()
if l.count('o') == 0:
	print('YES')
	exit()
if l.count('-') % l.count('o') == 0:
	print('YES')
	exit()
print('NO')


s = input()
pcnt = s.count('o')
lcnt = s.count('-')
print('YES' if lcnt == 0 or pcnt == 0 or lcnt % pcnt == 0 else 'NO')


S = str(input().strip())
pearls = 0
links = 0
for x in S:
	if x == 'o':
		pearls += 1
	elif x == '-':
		links += 1
if 0 in [links, pearls]:
	print('YES')
elif links % pearls == 0:
	print('YES')
else:
	print('NO')


def businki(s):
	(businki, niti) = (0, 0)
	for i in range(len(s)):
		if s[i] == 'o':
			businki += 1
		else:
			niti += 1
	if businki == 0:
		return 'YES'
	if niti % businki == 0:
		return 'YES'
	return 'NO'
print(businki(input()))


(n, m) = (0, 0)
for i in input():
	if i == 'o':
		n += 1
	else:
		m += 1
if n == 0:
	print('YES')
elif m % n == 0:
	print('YES')
else:
	print('NO')


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


s = input()
count1 = count2 = 0
for i in s:
	if i == '-':
		count1 += 1
	else:
		count2 += 1
if count2 == 0 or count1 == 0:
	print('YES')
elif count1 % count2 == 0:
	print('YES')
else:
	print('NO')


st = input()
a = st.count('-')
b = st.count('o')
if b != 0 and a % b:
	print('NO')
else:
	print('YES')


def answer(string):
	if string.count('o') == 0:
		return 'YES'
	elif string.count('-') == 0:
		return 'YES'
	elif string.count('o') == 1:
		return 'YES'
	elif string.count('o') % 2 == 0 and string.count('-') % 2 == 0 and (string.count('o') <= string.count('-')) and (string.count('-') % string.count('o') == 0):
		return 'YES'
	elif string.count('o') % 2 != 0 and string.count('-') == string.count('o'):
		return 'YES'
	elif string.count('o') % 2 != 0 and string.count('-') % string.count('o') == 0:
		return 'YES'
	else:
		return 'NO'
string = input()
ans = answer(string)
print(ans)


import sys

def isPossible(string):
	pearls = string.count('o')
	links = string.count('-')
	if links == 0 or pearls == 0:
		return 'YES'
	if links % pearls == 0:
		return 'YES'
	else:
		return 'NO'
string = input()
print(isPossible(string))


s = input()
o = 0
d = 0
for c in s:
	if c == 'o':
		o += 1
	else:
		d += 1
if o == 0 or d == 0 or d % o == 0:
	print('YES')
else:
	print('NO')


s = str(input())
count1 = 0
count2 = 0
for i in range(len(s)):
	if s[i] == '-':
		count1 += 1
	elif s[i] == 'o':
		count2 += 1
if count2 == 0:
	print('YES')
elif count1 % count2 == 0:
	print('YES')
else:
	print('NO')


n = str(input())
l = len(n)
link = 0
prl = 0
for i in range(0, l):
	if n[i] == '-':
		link = link + 1
	elif n[i] == 'o':
		prl = prl + 1
if prl == 0:
	print('YES')
elif link % prl == 0:
	print('YES')
else:
	print('NO')


s = list(input())
(o, dash) = (s.count('o'), s.count('-'))
if o == 0:
	print('YES')
elif dash % o == 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')


word = str(input())
i = 0
count = [0] * 3
while i < len(word):
	if word[i] == 'o':
		count[1] += 1
	elif word[i] == '-':
		count[2] += 1
	i += 1
if count[1] == 0 or count[2] == 0:
	print('YES')
elif count[2] % count[1] == 0:
	print('YES')
elif count[2] % count[1] != 0:
	print('NO')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
import random
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def main():
	s = S()
	c = collections.Counter(s)
	if c['o'] == 0:
		return 'YES'
	if c['-'] % c['o'] == 0:
		return 'YES'
	return 'NO'
print(main())


s = input()
x = s.count('o')
n = len(s)
y = s.count('-')
t = 1
while t > 0:
	if x == n or y == n or x == 1:
		print('YES')
		break
	elif x == y:
		print('YES')
	elif y > x and y % x == 0:
		print('YES')
	else:
		print('NO')
	t = t - 1


s = input()
c1 = 0
c2 = 0
for c in s:
	if c == '-':
		c1 += 1
	else:
		c2 += 1
if c2 == 0 or c1 % c2 == 0:
	print('YES')
else:
	print('NO')


a = input()
l = 0
p = 0
for i in a:
	if i == '-':
		l += 1
	else:
		p += 1
if l == 0 or p == 0:
	print('YES')
elif l % p == 0:
	print('YES')
else:
	print('NO')


s = input()
cl = []
count1 = 0
count2 = 0
for c in s:
	if c == '-':
		count1 += 1
	else:
		count2 += 1
if count2 == 0:
	print('YES')
elif count1 % count2 == 0:
	print('YES')
else:
	print('NO')


import atexit
import io
import sys
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())

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


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


import sys, os, io
from sys import stdin
from math import log, gcd, ceil
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import math
alphabets = list('abcdefghijklmnopqrstuvwxyz')

def isPrime(x):
	for i in range(2, x):
		if i * i > x:
			break
		if x % i == 0:
			return False
	return True

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def si():
	return input()

def prefix_sum(arr):
	r = [0] * (len(arr) + 1)
	for (i, el) in enumerate(arr):
		r[i + 1] = r[i] + el
	return r

def divideCeil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def ii():
	return int(input())

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

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')

def power_set(L):
	cardinality = len(L)
	n = 2 ** cardinality
	powerset = []
	for i in range(n):
		a = bin(i)[2:]
		subset = []
		for j in range(len(a)):
			if a[-j - 1] == '1':
				subset.append(L[j])
		powerset.append(subset)
	powerset_orderred = []
	for k in range(cardinality + 1):
		for w in powerset:
			if len(w) == k:
				powerset_orderred.append(w)
	return powerset_orderred

def fastPlrintNextLines(a):
	print('\n'.join(map(str, a)))

def sortByFirstAndSecond(A):
	A = sorted(A, key=lambda x: x[0])
	A = sorted(A, key=lambda x: x[1])
	return list(A)
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def solve():
	s = list(si())
	if s.count('o') == 0:
		print('YES')
		return
	if s.count('-') % s.count('o') == 0:
		print('YES')
		return
	print('NO')
t = 1
for _ in range(t):
	solve()


l = list(input())
n = len(l)
d = 0
p = 0
for i in range(n):
	if l[i] == 'o':
		p = p + 1
	else:
		d = d + 1
if p == 0 or d == 0 or d % p == 0:
	print('YES')
else:
	print('NO')


def main():
	str = input()
	if str.count('o') == 0:
		print('YES')
	elif not str.count('-') % str.count('o'):
		print('YES')
	else:
		print('NO')
main()


str = input()
dash = 0
ows = 0
for a in str:
	if a == '-':
		dash += 1
	if a == 'o':
		ows += 1
try:
	if dash % ows == 0:
		print('YES')
	else:
		print('NO')
except:
	print('YES')


l = list(input())
cnt1 = 0
cnt2 = 0
for i in l:
	if 'o' not in l:
		print('YES')
		exit()
for i in l:
	if i == 'o':
		cnt1 += 1
	elif i == '-':
		cnt2 += 1
if cnt2 % cnt1 == 0:
	print('YES')
else:
	print('NO')


from sys import stdin, stdout
s = input()
count_links = 0
count_pearls = 0
for i in s:
	if i == '-':
		count_links += 1
	elif i == 'o':
		count_pearls += 1
if count_links == 0:
	print('YES')
elif count_pearls == 0:
	print('YES')
elif count_links >= count_pearls and count_links % count_pearls == 0:
	print('YES')
else:
	print('NO')


s = input()
l = len(s)
c1 = 0
c2 = 0
for x in s:
	if x == '-':
		c1 += 1
	else:
		c2 += 1
if c2 == 0:
	print('YES')
elif c1 % c2 == 0:
	print('YES')
else:
	print('NO')


string = input()
n = len(string)
cnt_link = int(0)
cnt_pearl = int(0)
for x in string:
	if x == '-':
		cnt_link += 1
	elif x == 'o':
		cnt_pearl += 1
if cnt_pearl == 0:
	print('YES')
elif cnt_link % cnt_pearl == 0:
	print('YES')
else:
	print('NO')


necklace = input()
pearls_count = necklace.count('o')
lincs_count = len(necklace) - pearls_count
answer = 'YES' if pearls_count == 0 or lincs_count % pearls_count == 0 else 'NO'
print(answer)


s = input()
num_1 = 0
num_2 = 0
for i in s:
	if i == '-':
		num_1 += 1
	elif i == 'o':
		num_2 += 1
if num_1 == 0 or num_2 == 0:
	print('YES')
elif num_1 % num_2 == 0:
	print('YES')
else:
	print('NO')


d = 0
o = 0
for elem in list(input()):
	if elem == 'o':
		o += 1
	else:
		d += 1
if o == 0:
	print('YES')
elif d % o == 0:
	print('YES')
else:
	print('NO')


from sys import stdin, stdout

def rint():
	return map(int, stdin.readline().split())
s = input()
p = 0
l = 0
for ss in s:
	if ss == 'o':
		p += 1
	else:
		l += 1
if p == 0:
	print('YES')
elif l % p == 0:
	print('YES')
else:
	print('NO')


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


st = input()
p = st.count('o')
l = st.count('-')
if not p:
	print('YES')
elif not l % p:
	print('YES')
else:
	print('NO')


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


t = input()
oo = t.count('o')
j = len(t) - oo
if oo == 1 or oo == 0:
	print('YES')
elif j % oo == 0:
	print('YES')
else:
	print('NO')


s = input()
if not s.count('o'):
	print('Yes')
	raise SystemExit()
if not s.count('-') % s.count('o'):
	print('Yes')
else:
	print('No')


n = input()
k = n.count('o')
h = n.count('-')
if k != 0 and h != 0 and (h % k != 0):
	print('NO')
else:
	print('YES')


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')


def solve(s):
	o = 0
	l = 0
	for i in s:
		if i == '-':
			l += 1
		else:
			o += 1
	max_val = max(l, o)
	min_val = min(l, o)
	if o == 0 or l == 0:
		return 'YES'
	if l < o:
		return 'NO'
	if max_val % min_val == 0:
		return 'YES'
	return 'NO'

def main():
	s = input()
	print(solve(s))
main()


str = input()
count1 = 0
count2 = 0
for i in str:
	if i == 'o':
		count1 += 1
	else:
		count2 += 1
if count2 == 0 or count1 == 0:
	print('YES')
elif count2 % count1 == 0:
	print('YES')
else:
	print('NO')


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x))
s = get_string()
if 'o' not in s:
	print('YES')
else:
	p = s.count('o')
	l = s.count('-')
	if l % p == 0:
		print('YES')
	else:
		print('NO')


l1 = list(input())
try:
	if l1.count('-') % l1.count('o') == 0:
		print('YES')
	else:
		print('NO')
except:
	print('YES')


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


r = str(input())
p = r.count('o')
l = r.count('-')
if p == 0 or l == 0:
	print('YES')
elif l % p == 0:
	print('YES')
else:
	print('NO')


g = 0
l = 0
s = input()
for i in s:
	l = l + 1
	if i == 'o':
		g = g + 1
if g == 0:
	t = 0
else:
	t = l % g
if t == 0:
	print('YES')
else:
	print('NO')


a = input()
dash = 0
pearl = 0
for i in range(len(a)):
	if a[i] == 'o':
		pearl += 1
	else:
		dash += 1
if dash != 0 and pearl != 0:
	if dash / pearl - dash // pearl == 0:
		print('YES')
	else:
		print('NO')
else:
	print('YES')


st = input().strip()
counto = 0
count_ = 0
for c in st:
	if c == 'o':
		counto += 1
	else:
		count_ += 1
if counto == 0 or count_ == 0 or counto == 1:
	print('YES')
	exit(0)
if count_ % counto == 0:
	print('YES')
else:
	print('NO')


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


s = input()
k = s.count('o')
r = s.count('-')
if k == 0:
	print('YES')
elif r % k == 0:
	print('YES')
else:
	print('NO')


a = list(input())
z = a.count('o')
if z == 0:
	print('YES')
elif (len(a) - z) % z == 0:
	print('YES')
else:
	print('NO')


s = input()
d = {}
for i in s:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
if len(d) > 1:
	if d['-'] / d['o'] == d['-'] // d['o']:
		print('YES')
	else:
		print('NO')
else:
	print('YES')


def answer(pearls, links):
	if links == 0 or pearls == 0:
		return 'YES'
	return 'NO' if links % pearls else 'YES'
s = input().strip()
pearls = 0
links = 0
for c in s:
	if c == 'o':
		pearls += 1
	else:
		links += 1
print(answer(pearls, links))


s = input()
oc = 0
mc = 0
for i in s:
	if i == 'o':
		oc += 1
	else:
		mc += 1
if oc == 0 or mc % oc == 0:
	print('YES')
else:
	print('NO')


n = input()
l = n.count('-')
o = n.count('o')
if o == 0:
	print('YES')
	quit(0)
if l % o == 0:
	print('YES')
else:
	print('NO')


from math import *
from copy import *
from string import *
from random import *
from sys import stdin
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math
s = str(input())
c1 = 0
c2 = 0
for i in range(len(s)):
	if s[i:i + 1] == 'o':
		c1 += 1
	else:
		c2 += 1
if c1 == 0 or c2 % c1 == 0:
	print('YES')
else:
	print('NO')


s = input()
print('YES' if s.count('-') % (s.count('o') or 1) is 0 else 'NO')


a = input()
from math import ceil as c
if a.count('o') == 0:
	print('YES')
	exit()
print('YES' if a.count('-') // a.count('o') == c(a.count('-') / a.count('o')) else 'NO')


a = list(input())
o = a.count('o')
k = a.count('-')
if o == 0 or k % o == 0:
	print('YES')
else:
	print('NO')


s = input()
a = s.count('-')
a = len(s) - a
c = len(s)
if a == 0 or c % a == 0:
	print('YES')
else:
	print('NO')


k = input()
o = k.count('o')
day = k.count('-')
if o == 0:
	print('YES')
elif day % o == 0:
	print('YES')
else:
	print('NO')


def main():
	n = input()
	line = n.count('-')
	hill = n.count('o')
	if hill == 0:
		print('YES')
		return
	print('YES' if line % hill == 0 else 'NO')
main()


str = input()
p = 0
l = 0
for i in str:
	if i == '-':
		l += 1
	else:
		p += 1
if l == 0 or p == 0:
	print('YES')
elif l >= p and l % p == 0:
	print('YES')
else:
	print('NO')


n = input()
k = n.count('-')
p = n.count('o')
if k == 0 or p == 0:
	print('YES')
elif k % p == 0:
	print('YES')
else:
	print('NO')


s = input()
a = s.count('o')
b = s.count('-')
if a == 0 or b == 0:
	print('yes')
elif b % a == 0:
	print('yes')
else:
	print('no')


a = input()
b = 0
c = 0
for x in range(len(a)):
	if a[x] == '-':
		b += 1
	else:
		c += 1
if c == 0:
	print('YES')
elif b % c == 0:
	print('YES')
else:
	print('NO')


s = input()
nit = 0
oo = 0
for i in s:
	if i == '-':
		nit += 1
	else:
		oo += 1
if oo == 0:
	print('YES')
	exit()
print('YES' if nit % oo == 0 else 'NO')


s = input()
n = len(s)
lcnt = 0
pcnt = 0
for i in range(n):
	if s[i] == '-':
		lcnt += 1
	else:
		pcnt += 1
if pcnt == 0:
	ok = True
else:
	ok = lcnt % pcnt == 0
if ok:
	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()


s = input()
k1 = 0
k2 = 0
for x in s:
	if x == 'o':
		k1 += 1
	else:
		k2 += 1
if k1 == 0:
	print('YES')
elif k2 % k1 == 0:
	print('YES')
else:
	print('NO')


s = input()
pearls = s.count('o')
links = s.count('-')
if pearls <= 1:
	print('YES')
	exit()
if links % pearls == 0:
	print('YES')
else:
	print('NO')


inp = input()
linkCnt = 0
pearlCnt = 0
for i in inp:
	if i == '-':
		linkCnt += 1
	else:
		pearlCnt += 1
if linkCnt == 0 or pearlCnt == 0:
	print('YES')
elif linkCnt % pearlCnt == 0:
	print('YES')
else:
	print('NO')


def solve(linha, perolas):
	if perolas == 0:
		return True
	else:
		return linha % perolas == 0

def main():
	s = input()
	(x, y) = (0, 0)
	for c in s:
		if c == '-':
			x += 1
		else:
			y += 1
	if solve(x, y):
		print('YES')
	else:
		print('NO')
main()


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


s = str(input())
l = [0] * 2
for i in s:
	if i == '-':
		l[1] += 1
	else:
		l[0] += 1
if l[0] == len(s):
	print('YES')
elif l[1] == len(s):
	print('YES')
elif l[1] % l[0] == 0:
	print('YES')
else:
	print('NO')


def main():
	text = input()
	perls = text.count('o')
	links = text.count('-')
	if not perls:
		return 'YES'
	if links % perls == 0:
		return 'YES'
	return 'NO'
print(main())


s = input()
c = s.count('-')
c1 = s.count('o')
if c == 0:
	print('YES')
elif c1 == 0:
	print('YES')
elif c % c1 == 0:
	print('YES')
else:
	print('NO')


s = list(input())
l = s.count('-')
p = len(s) - l
if 0 in [p, l]:
	print('YES')
elif p > l:
	print('NO')
else:
	print('YES' if l % p == 0 else 'NO')


s = input()
countlink = 0
countpearl = 0
for char in s:
	if char == '-':
		countlink += 1
	else:
		countpearl += 1
if countpearl == 0:
	print('YES')
elif countlink % countpearl == 0:
	print('YES')
else:
	print('NO')


import math
s = input()
pearls = s.count('o')
links = s.count('-')
if pearls == 0:
	print('YES')
	exit(0)
each = links / pearls
if math.ceil(each) == math.floor(each):
	print('YES')
else:
	print('NO')


s = input()
hyphen = 0
gol = 0
for i in s:
	if i == '-':
		hyphen += 1
	else:
		gol += 1
if gol == 0:
	print('YES')
	exit()
if hyphen % gol == 0:
	print('YES')
else:
	print('NO')


necklace = input()
pearls = 0
links = 0
for c in necklace:
	if c == '-':
		links += 1
	else:
		pearls += 1
if pearls == 0 or links % pearls == 0:
	print('YES')
else:
	print('NO')


s = input()
_cnt = 0
ocnt = 0
for i in s:
	if i == '-':
		_cnt += 1
	else:
		ocnt += 1
if ocnt == 0:
	print('YES')
elif _cnt % ocnt == 0:
	print('YES')
else:
	print('NO')


s = input()
len(s)
circ = 'o'
otr = '-'
cntc = 0
cnto = 0
for i in s:
	if i == circ:
		cntc = cntc + 1
	else:
		cnto = cnto + 1
if cntc == 0:
	print('YES')
elif cnto % cntc == 0:
	print('YES')
else:
	print('NO')


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


s = input()
if s.count('-') == 0:
	print('YES')
else:
	o = 0
	dash = 0
	for i in s:
		if i == 'o':
			o += 1
		else:
			dash += 1
	if o == 0:
		print('YES')
	elif dash % o == 0:
		print('YES')
	else:
		print('NO')


str = input()
a = []
pearl = 0
link = 0
for i in range(0, len(str)):
	if str[i] == '-':
		link += 1
	else:
		pearl += 1
if pearl == 0:
	print('YES')
elif link % pearl == 0:
	print('YES')
else:
	print('NO')


import math
from math import *
s = input()
count1 = s.count('o')
count2 = s.count('-')
if count1 == 0 or count2 == 0:
	print('YES')
elif count2 / count1 == math.floor(count2 / count1):
	print('YES')
else:
	print('NO')


def main():
	necklace = input()
	n_pearls = necklace.count('o')
	n_links = len(necklace) - n_pearls
	print('YES' if n_pearls == 0 or n_links % n_pearls == 0 else 'NO')
main()


S = input()
x1 = S.count('o')
x2 = S.count('-')
if x1 == 0 or x2 == 0:
	print('YES')
elif x2 % x1 == 0:
	print('YES')
else:
	print('NO')


n = input()
o = n.count('o')
l = n.count('-')
if o == 0:
	print('YES')
	exit()
if l % o == 0:
	print('YES')
else:
	print('NO')


s = input()
ans = 'YES'
a = s.count('o')
b = s.count('-')
if a and b % a:
	ans = 'NO'
print(ans)


text = input()
print('YES' if text.count('-') % max(text.count('o'), 1) == 0 else 'NO')


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


s = input()
(a, o) = (0, 0)
for c in s:
	if c == '-':
		a += 1
	elif c == 'o':
		o += 1
print('YES' if o == 0 or a % o == 0 else 'NO')


s = input()
p = 0
l = 0
for c in s:
	if c == 'o':
		p += 1
	else:
		l += 1
ans = 'NO'
if p == 0 or l % p == 0:
	ans = 'YES'
print(ans)


n = input()
no_o = n.count('o')
no_dash = n.count('-')
if no_o == 0:
	print('YES')
elif no_dash % no_o == 0:
	print('YES')
else:
	print('NO')


a = input()
c1 = 0
c2 = 0
for i in range(0, len(a)):
	if a[i] == '-':
		c1 += 1
	else:
		c2 += 1
if c2 == 0:
	print('YES')
elif c2 != 0 and c1 % c2 == 0:
	print('YES')
else:
	print('NO')


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


a = 0
b = 0
string = input()
for s in string:
	if s == '-':
		a += 1
	else:
		b += 1
if b == 0:
	print('YES')
elif a % b == 0:
	print('YES')
else:
	print('NO')


s = [n for n in input()]
a = s.count('o')
b = s.count('-')
if a == 0 or a == 1:
	print('YES')
elif b % a == 0:
	print('YES')
else:
	print('NO')


x = list(input())
(o, n) = (0, 0)
for i in range(len(x)):
	if x[i] == 'o':
		o += 1
	else:
		n += 1
if o == 0 or n == 0 or n % o == 0:
	print('YES')
else:
	print('NO')


from collections import defaultdict, deque
import sys, heapq, bisect, math, itertools, string, queue, copy, time
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
mod = 10 ** 9 + 7
eps = 10 ** (-7)

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))

def inpl_str():
	return list(sys.stdin.readline().split())
S = list(input())
n1 = S.count('-')
n2 = S.count('o')
if n2 == 0:
	print('YES')
elif n1 % n2 == 0:
	print('YES')
else:
	print('NO')


source = input('')
links = source.count('-')
pearls = source.count('o')
positive = pearls == 0 or links % pearls == 0
print('YES' if positive else 'NO')


s = input().strip()
k = 0
l = 0
for i in range(len(s)):
	if s[i] == '-':
		k += 1
	else:
		l += 1
if l == 0 or k % l == 0:
	print('YES')
else:
	print('NO')


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


s = input()
n_p = 0
n_s = 0
for i in s:
	if i == 'o':
		n_p += 1
	else:
		n_s += 1
if n_p == 0:
	print('YES')
elif n_s % n_p == 0:
	print('YES')
else:
	print('NO')


s = input()
x = s.count('-')
y = len(s) - x
y = max(1, y)
print('YES' if x % y == 0 else 'NO')


s = input()
print('NO' if len(s) % (s.count('o') or 1) else 'YES')


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


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


from sys import stdin, stdout
from math import factorial
from math import log10
s = stdin.readline().strip()
(a, b) = (s.count('o'), s.count('-'))
if not a or b % a == 0:
	stdout.write('YES')
else:
	stdout.write('NO')


s = input()
k1 = 0
k2 = 0
for i in range(len(s)):
	if s[i] == 'o':
		k1 += 1
	else:
		k2 += 1
if k1 == 0:
	print('YES')
	exit(0)
if k2 % k1 == 0:
	print('YES')
else:
	print('NO')


s = input()
c_ = 0
co = 0
for i in s:
	if i == '-':
		c_ += 1
	else:
		co += 1
if co == 0:
	print('YES')
elif c_ % co == 0:
	print('YES')
else:
	print('NO')


s = input()
bus = s.count('o')
nit = s.count('-')
if bus <= 1 or nit == 0:
	print('YES')
	quit()
if nit % bus == 0:
	print('YES')
else:
	print('NO')


s = input()
o = s.count('o')
m = s.count('-')
if o == 1:
	print('YES')
elif not m:
	print('YES')
elif not o:
	print('YES')
elif m == 1:
	print('NO')
elif o > m:
	print('NO')
elif m % o == 0:
	print('YES')
else:
	print('NO')


a = input()
s1 = a.count('o')
s2 = a.count('-')
if s1 == 0 or s2 % s1 == 0:
	print('YES')
else:
	print('NO')


necklace = input()
numberOfPearls = necklace.count('o')
print('NO' if numberOfPearls and len(necklace) % numberOfPearls else 'YES')


s = input()
km = 0
kb = 0
for el in s:
	if el == '-':
		km += 1
	else:
		kb += 1
if km != 0 and kb != 0:
	if km % kb == 0:
		print('YES')
	else:
		print('NO')
else:
	print('YES')


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


z = input
mod = 10 ** 9 + 7
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)
l = z()
p = l.count('-')
t = l.count('o')
print('yes' if t == 0 or p % t == 0 else 'no')


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


from sys import stdin, stdout

def main():
	s = input()
	p = sum(map(lambda x: x == 'o', s))
	l = sum(map(lambda x: x == '-', s))
	if p == 0 or l % p == 0:
		print('YES')
	else:
		print('NO')
main()


from collections import Counter
c = Counter(input())
print('Yes' if c['o'] == 0 or not c['-'] % c['o'] else 'No')


s = list(input())
p = []
cnt = 0
for i in range(len(s)):
	if s[i] == '-':
		cnt += 1
	else:
		p.append(0)
cnt1 = len(p)
if cnt1 == 0:
	print('YES')
else:
	i = 0
	for j in range(cnt):
		p[i] += 1
		if i < cnt1 - 1:
			i += 1
		else:
			i = 0
	flag = 0
	for i in range(cnt1 - 1):
		if p[i] != p[i + 1]:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


s = input()
d = {}
for i in s:
	d[i] = d.get(i, 0) + 1
b = d.get('-', 0)
a = d.get('o', 0)
if a == 0 or b == 0 or b % a == 0:
	print('YES')
else:
	print('NO')


s = input()
n = s.count('-')
b = s.count('o')

def solve(n, b):
	if b == 0:
		return 'YES'
	if n == 0:
		return 'YES'
	if n % b == 0:
		return 'YES'
	return 'NO'
print(solve(n, b))


string = input()
ss = string.count('-')
os = string.count('o')
if os == 0:
	print('YES')
elif ss % os == 0:
	print('YES')
else:
	print('NO')


s = list((str(i) for i in input()))
b = 0
n = 0
for e in s:
	if e == 'o':
		b += 1
	else:
		n += 1
if b == 0 or n % b == 0:
	print('YES')
else:
	print('NO')


s = input()
nbeads = s.count('o')
nnets = s.count('-')
print(('NO', 'YES')[nbeads == 0 or nnets % nbeads == 0])


n = input()
c = 0
d = 0
for i in n:
	if i == '-':
		c = c + 1
	else:
		d = d + 1
if d == 0 or c % d == 0:
	print('YES')
else:
	print('NO')


inp = input()
data = {'tokens': None, 'i': 0}
data['tokens'] = inp.split()

def get_str():
	if data['i'] == len(data['tokens']):
		data['tokens'] = input().split()
		data['i'] = 0
	token = data['tokens'][data['i']]
	data['i'] += 1
	return token

def get_int():
	return int(get_str())
line = get_str()
o = line.count('o')
n = line.count('-')
if o == 0:
	print('Yes')
elif n % o == 0:
	print('Yes')
else:
	print('No')


s = input()
(x, y) = (0, 0)
for i in s:
	if i == '-':
		x = x + 1
	else:
		y += 1
if y == 0:
	print('YES')
elif x % y == 0:
	print('YES')
else:
	print('NO')


s = input()
if not s.count('-') or not s.count('o'):
	print('YES')
elif not s.count('-') % s.count('o'):
	print('YES')
else:
	print('NO')


enter = input()
equis = 0
circulos = 0
for x in enter:
	if x == 'o':
		circulos += 1
	else:
		equis += 1
if not equis or not circulos:
	print('YES')
elif circulos > equis:
	print('NO')
elif not equis % circulos:
	print('YES')
else:
	print('NO')


s = input()
p = s.count('o')
n = len(s)
if p == 0 or n % p == 0:
	ans = 'YES'
else:
	ans = 'NO'
print(ans)


inputs = input()
pearls = 0
links = 0
for char in inputs:
	if char == 'o':
		pearls += 1
	if char == '-':
		links += 1
if pearls == 0:
	answer = 'YES'
elif links == 0:
	answer = 'YES'
elif links % pearls == 0:
	answer = 'YES'
else:
	answer = 'NO'
print(answer)


strr = input()
g_count = 0
m_count = 0
for i in range(len(strr)):
	if strr[i] == '-':
		g_count += 1
	else:
		m_count += 1
if ('o' in strr) == False or g_count % m_count == 0:
	print('YES')
else:
	print('NO')