Two players play a simple game. Each player is provided with a box with balls. First player's box contains exactly n1 balls and second player's box contains exactly n2 balls. In one move first player can take from 1 to k1 balls from his box and throw them away. Similarly, the second player can take from 1 to k2 balls from his box in his move. Players alternate turns and the first player starts the game. The one who can't make a move loses. Your task is to determine who wins if both players play optimally.

The first line contains four integers n1, n2, k1, k2. All numbers in the input are from 1 to 50. This problem doesn't have subproblems. You will get 3 points for the correct submission.

Output "First" if the first player wins and "Second" otherwise.

NoteConsider the first sample test. Each player has a box with 2 balls. The first player draws a single ball from his box in one move and the second player can either take 1 or 2 balls from his box in one move. No matter how the first player acts, the second player can always win if he plays wisely.

l=input().split()
if int(l[0])<=int(l[1]):
    print("Second")
else:
    print("First")

b = list(map(int, input().split()))
i = 0
if b[0] > b[1]:
    print('First')
else:
    print('Second')

a=input().split()
if int(a[0])>int(a[1]):
	print("First")
else:
	print("Second")

n1, n2, k1, k2 = map(int, raw_input().split())

if n1>n2:
    print "First"
else:
    print "Second"

numbers = raw_input().split(" ")
player1Box = int(numbers[0])
player2Box = int(numbers[1])
player1Balls = int(numbers[2])
player2Balls = int(numbers[3])

if player1Box <= player2Box:
	print "Second"
else:
	print "First"

n1, n2, k1, k2 = map(int, input().split())
if n1 > n2:
  print('First')
else:
  print('Second')

n1, n2, k1, k2 = map(int, input().split())
if n2 >= n1:
    print('Second')
else:
    print('First')

# int(input())
# [int(s) for s in input().split()]
# input()

def solve():
    n1 ,n2, k1, k2 = [int(s) for s in input().split()]
    if n1 <= n2:
        print("Second")
    else:
        print("First")

if __name__ == "__main__":
    solve()

import sys

try:
    for line in iter(sys.stdin.readline, b''):
        parts = line.split()
        n1 = int(parts[0])
        n2 = int(parts[1])
        if n1 == n2:
            print "Second\n"
        elif n1 > n2:
            print "First\n"
        else:
            print "Second\n"
except KeyboardInterrupt:
    sys.stdout.flush()
    pass

n1,n2,k1,k2 = map(int, input().split())
if n1>n2:
    print('First')
else:
    print('Second')

a, b, c, d=map(int, input().split())
if a>b:
  print("First")
else:
  print("Second")

n1, n2, k1, k2 = list(map(lambda x: int(x), input().split(" ")))

if n1 > n2:
    print('First')
else:
    print('Second')

n1, n2, k1, k2 = map(int, raw_input().split())

if n1 <= n2:
    print 'Second'
else:
    print 'First'

n1,n2,k1,k2=map(int,input().split())
if n1>n2:
    print("First")
else:
    print("Second")

import sys
n1,n2,k1,k2=raw_input().split()
n1=int(n1)
n2=int(n2)

if n1 == n2 :
	print "Second\n"
elif n1 > n2 :
	print "First\n"
else:
	print "Second\n"

n,k,A,B = [int(x) for x in input().split()]
if n==k:
  print('Second')
elif n>k:
  print('First')
else:
  print("Second")
# 1512497245763

a,b,c,d=map(int,input().split())
if a==b:
    print('Second')
elif a>b:
    print('First')
else:
    print('Second')

a,b,c,d=map(int,raw_input().split())
while 1:
    if a==0:
        print 'Second'
        break
    if b==0:
        print 'First'
        break
    a-=1
    b-=1

# Game
[n1, n2, k1, k2] = map(int, raw_input().split())

if n1 > n2:
    print 'First'
else:
    print 'Second'

n1,n2,k1,k2=map(int,input().split(" "))
if n2>=n1:
    print("Second")
else:
    print("First")

n1,n2,k1,k2=map(int,input().split())
while(True):
	n1=n1-1
	if(n1==0 and n2>0):
		print("Second")
		break
	elif(n2==0 and n1>0):
		print("First")
		break
	elif(n1==0 and n2==0):
		print("Second")
		break
	n2=n2-1
	if(n1==0 and n2>0):
		print("Second")
		break
	elif(n2==0 and n1>0):
		print("First")
		break
	elif(n1==0 and n2==0):
		print("Second")
		break

import sys

sys.setrecursionlimit(10 ** 6)

def pyes_no(condition) :
  if condition :
    print ("YES")
  else :
    print ("NO")

def plist(a, s = ' ') :
  print (s.join(map(str, a)))

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

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

def rfield(n, m = None) :
  if m == None :
    m = n

  field = []
  for i in xrange(n) :
    chars = sys.stdin.readline().strip()
    assert(len(chars) == m)
    field.append(chars)
  return field

def pfield(field, separator = '') :
  print ('\n'.join(map(lambda x: separator.join(x), field)))

def check_field_equal(field, i, j, value) :
  if i >= 0 and i < len(field) and j >= 0 and j < len(field[i]) :
    return value == field[i][j]
  return None

def digits(x, p) :
  digits = []
  while x > 0 :
    digits.append(x % p)
    x //= p
  return digits

def modpower(a, n, mod) :
  r = a ** (n % 2)
  if n > 1 :
    r *= modpower(a, n // 2, mod) ** 2
  return r % mod

def gcd(a, b) :
  if a > b :
    a, b = b, a

  while a > 0 :
    a, b = b % a, a

  return b

def vector_distance(a, b) :
  diff = vector_diff(a, b)

  return scalar_product(diff, diff) ** 0.5

def vector_inverse(v) :
  r = [-x for x in v]

  return tuple(r)

def vector_diff(a, b) :
  return vector_sum(a, vector_inverse(b))

def vector_sum(a, b) :
  r = [c1 + c2 for c1, c2 in zip(a, b)]

  return tuple(r)

def scalar_product(a, b) :
  r = 0
  for c1, c2 in zip(a, b) :
    r += c1 * c2

  return r

def check_rectangle(points) :
  assert(len(points) == 4)

  A, B, C, D = points

  for A1, A2, A3, A4 in [
    (A, B, C, D),
    (A, C, B, D),
    (A, B, D, C),
    (A, C, D, B),
    (A, D, B, C),
    (A, D, C, B),
  ] :
    sides = (
      vector_diff(A1, A2),
      vector_diff(A2, A3),
      vector_diff(A3, A4),
      vector_diff(A4, A1),
    )
    if all(scalar_product(s1, s2) == 0 for s1, s2 in zip(sides, sides[1:])) :
       return True
  return False

def check_square(points) :
  if not check_rectangle(points) :
    return False
  A, B, C, D = points

  for A1, A2, A3, A4 in [
    (A, B, C, D),
    (A, C, B, D),
    (A, B, D, C),
    (A, C, D, B),
    (A, D, B, C),
    (A, D, C, B),
  ] :
    side_lengths = [
      (first[0] - next[0]) ** 2 + (first[1] - next[1]) ** 2 for first, next in zip([A1, A2, A3, A4], [A2, A3, A4, A1])
    ]
    if len(set(side_lengths)) == 1 :
      return True

  return False

def check_right(p) :
  # Check if there are same points
  for a, b in [
    (p[0], p[1]),
    (p[0], p[2]),
    (p[1], p[2]),
  ] :
    if a[0] == b[0] and a[1] == b[1] :
      return False

  a, b, c = p
  a, b, c = vector_diff(a, b), vector_diff(b, c), vector_diff(c, a)

  return scalar_product(a, b) * scalar_product(a, c) * scalar_product(b, c) == 0

n1, n2, k1, k2 = rints()

if n1 > n2 :
  print 'First'
else :
  print 'Second'

n1,n2,k1,k2=map(int,input().split())
dp = [[[-1] * 51] * 51] * 2
def win(n1,n2,p = 0):
    if dp[p][n1][n2] != -1:
        return dp[p][n1][n2]
    if p:
        for i in range(1,k2 + 1):
            if n2 - i > -1 and win(n1,n2 - i,1 - p) == False:
                dp[p][n1][n2] = True
                return True
    else:
        for i in range(1,k1 + 1):
            if n1 - i > -1 and win(n1 - i,n2,1 - p) == False:
                dp[p][n1][n2] = True
                return True
    dp[p][n1][n2] = False
    return False
print ('First' if win(n1,n2) else 'Second')

n1 , n2 , k1 , k2 = map(int,input().split())

if n1 > n2 :
    print('First')

else:
    print('Second')

def game():
    n = raw_input().split()
    n1 = int(n[0])
    n2 = int(n[1])
    k1 = int(n[1])
    k2 = int(n[2])
    if n1 == n2:
        print("Second")
    elif n1 > n2:
        print("First")
    else:
        print("Second")

game()

#513A
[n1,n2,k1,k2] = list(map(int,input().split()))
if n1 <= n2:
    print('Second')
else:
    print('First')

a=input().split()
x=int(a[0])
y=int(a[1])
p=int(a[2])
q=int(a[3])
m=0
n=0
r=min(p,q)
while(x>0 and y>0):
    x=x-1
    if(x<=0):
        break
    m=m+1
    y=y-1
    if(y<=0):
        break
    n=n+1
if(m>n):
    print("First")
else:
    print("Second")

n1,n2,k1,k2=map(int,input().strip().split(' '))
if n1>n2:
  print("First")
else:
  print("Second")

a = map(int,raw_input().split())
if a[0] > a[1]:
	print 'First'
else:
	print 'Second'

a,b,c,d=map(int,raw_input().split())
if a>b:
    print "First"
else:
    print"Second"

n1,n2,k1,k2=input().split()
n1,n2=int(n1),int(n2)
if n1>n2:
    print('First')
elif n1<=n2:
    print('Second')

n1, n2, k1, k2 = map(int, raw_input().split())

if n1>n2:
    print "First"
else:
    print "Second"

def ret_input():
    data = [int(x) for x in raw_input().split()]
    return data

def game(data):
    n1 = data[0]
    n2 = data[1]
    k1 = data[2]
    k2 = data[3]
    if n1 > n2:
        return 'First'
    else:
        return 'Second'

def main():
    data = ret_input()
    print game(data)

if __name__ == '__main__':
    main()

balls_p1, balls_p2, max_takes_p1, max_takes_p2 = map(int, input().split())
print('First' if balls_p1 > balls_p2 else 'Second')

n1, n2, k1, k2 = map(int, raw_input().split())

if n1 <= n2:
    print 'Second'
else:
    print 'First'

n1,n2,k1,k2 = map(int, raw_input().split())

if n1 > n2:
	print 'First'
else:
	print 'Second'

a = map(int, raw_input().split())
print ('Second', 'First')[a[1] < a[0]]

l=[int(x) for x in raw_input().split()]
if l[0]>l[1]:
	print "First"
elif l[0]<l[1]:
	print "Second"
if l[0]==l[1]:
	print "Second"

[n1, n2, k1, k2] = [int(x) for x in input().split()]
print('First' if n1 > n2 else 'Second')

n1,n2,k1,k2=map(int,input().split())
if n1>n2:
    print("First")
else:
    print("Second")

l=input().split()
q=0
if int(l[0])<=int(l[1]):
    print("Second")
else:
    print("First")

n1, n2, _, _ = map(int, raw_input().split())

print "First" if n1 > n2 else "Second"

w = list(map(int, input().split()))
print('First')if(w[0] > w[1]) else print("Second")

n1,n2,k1,k2 = map(int,raw_input().split())
ans = ""
if n1 == n2:
    ans = "Second"
else:
    ans = "First" if n1 > n2 else "Second"
print ans

import sys

input = sys.stdin
output = sys.stdout

# input = open('input.txt')

# n = int(input.readline().strip())
n1, n2, _, _ = [int(x) for x in input.readline().strip().split()]

if n1 > n2:
    output.write('First\n')
else:
    output.write('Second\n')

# output.write('%d\n' % max(d))

a,b,c,d=map(int,raw_input().split())
if a>b:
    print "First"
else:
    print "Second"

n1, n2, k1, k2 = map(int, input().split())

if n1 == n2:
    print('Second')

elif n1 > n2:
    print('First')
elif n1 < n2:
    print('Second')

n1, n2, k1, k2 = list(map(int, input().split()))

print( "First" if n1 > n2 else "Second" )

import sys

def main():

    n1,n2,k1,k2 = map(int, sys.stdin.readline().split())

    if n1 <= n2:
        sys.stdout.write('Second')
    else:
        sys.stdout.write('First')

if __name__ == '__main__':
    main()

L=[int(x) for x in raw_input().split()]
if L[0]>L[1]:
    print "First"
else:
    print "Second"

n,m,a,b=map(int,input().split(" "))
if n>m:
	print("First")
elif m>n:
	print("Second")
elif m==n:
	print("Second")

a,b,c,d=[int(i) for i in input().split()]
ans=0
while(a>0 or b>0):
    a=a-1
    if(a<=0):
        ans='Second'
        break
    b=b-1
    if(b<=0):
        ans='First'
        break
    if(a<=0 or b<=0):
        break
print(ans)

w = list(map(int, input().split()))
if(w[0] > w[1]):
    print('First')
else:
    print("Second")

n1,n2,k1,k2=map(int,input().strip().split(' '))
if n1>n2:
  print("First")
else:
  print("Second")

n1,n2,k1,k2 = [int(i) for i in input().split()[:4]]

j=0
while(n1!=0 and n2!=0):
    if(j%2==0):
        n1 = n1-1
    else:
        n2 = n2-1
    j+=1

if(n1==0):
    print("Second")
else:
    print("First")

n,k,A,B = [int(x) for x in input().split()]
if n==k:
  print('Second')
elif n>k:
  print('First')
else:
  print("Second")
# 1512497245763

n1,n2,k1,k2 = map(int, raw_input().split())
if n1 > n2:
	print "First"
elif n2 > n2:
	print "Second"
else:
	print"Second"

n1,n2,k1,k2=map(int,input().split())
if n1>n2:
	print("First")
elif n1<n2:
	print("Second")
elif n1==n2:
	print("Second")

a=map(int,raw_input().split())
if a[0]>a[1]:
	print "First"
else:
	print "Second"

m,n,k,l=map(int,input().split())
if m==n:
    print("Second")
elif m>n:
    print("First")
else:
    print("Second")

[n1,n2,k1,k2]=[int(i) for i in raw_input().strip().split()]
Flag=False
if n1==0:
    print "Second"
    Flag=True
if n2==0:
    print "First"
    Flag=True
while n1>=0 and n2>=0 and Flag==False:
    n1-=1

    if n1<0:
        print 'Second'
        break
    n2-=1

    if n2<0:
        print 'First'
        break

n1,n2,k1,k2=input().split()
n1,n2,k1,k2=int(n1),int(n2),int(k1),int(k2)
if n1>n2:
    print("First")
else:
    print("Second")

def solve(n1,n2,k1,k2):
    if(n1>n2):
        return "First"
    else:
        return "Second"
n1,n2,k1,k2=map(int,input().split())
print(solve(n1,n2,k1,k2))

n1,n2,k1,k2=map(int,raw_input().split())
if n1==n2:
    print "Second"
elif n1>n2:
    print "First"
else:
    print "Second"

a,b,c,d=map(int,input().split())
if a>b:
    print("First")
else :
    print("Second")

l=list(map(int,input().split()))
while True :
	l[0]=l[0]-1
	if l[0]<0:
		print("Second")
		break
	l[1]=l[1]-1
	if l[1]<0:
		print("First")
		break

n1,n2,k1,k2=map(int,input().split())
if k2>k1:
    if (n1<=n2):
        print("Second")
    elif n1>n2:
        print("First")
elif k1==k2:
    if n1>n2:
        print("First")
    elif n1<=n2:
        print("Second")

else:
    if (n1==n2)or(n1<n2):
        print("Second")
    elif n1>n2:
        print("First")

x1, x2, y1, y2 = map(int, input().split())

if x1+y2 > x2+y2:
    print("First")
else:
    print("Second")

n1,n2,k1,k2=map(int,raw_input().split())

if n1>n2:
    print "First"
else :
    print "Second"

1

n1,n2,k1,k2=map(int,raw_input().split(' '))
print 'First' if(n1>n2) else 'Second'

n,k,l,r= map(int, input().split())
if (k>=n):
    print ('Second')
else :
    print('First')

n1,n2,k1,k2=map(int,input().split())
if n1==n2:
    print("Second")
elif n1<n2:
    print("Second")
elif n1>n2:
    print("First")

n1, n2, k1, k2 = [int(i) for i in input().split()]

if (n1 > n2):
    print("First")
else:
    print("Second")

a=input().split()
if int(a[0])>int(a[1]):
	print("First")
else:
	print("Second")

y=input()
n_1,n_2,k_1,k_2=y.split()
n_1=int(n_1)
n_2=int(n_2)
a="First"
b="Second"

if n_1==n_2:
    print(b)
elif n_1>n_2:
    print(a)
else:
    print(b)

n1, n2, k1, k2 = map(int, raw_input().strip().split())

if n1 > n2:
	print "First"

else:
	print "Second"

n1,n2,k1,k2=map(int,input().split())
if n1<=n2:
    print("Second")
else:
    print("First")

from sys import stdin
for j in range(1):
    [n1,n2,k1,k2] = [int(x) for x in stdin.readline().split()]
    if n1>n2:
        print("First")
    else:
        print("Second")

n1, n2, k1, k2 = [int(x) for x in input().split()]
if n1 > n2:
    print("First")
else:
    print("Second")

n,m,k,l=map(int,input().split())
if(n>m):
 print("First")
else:
 print("Second")

def solve(n1,n2,k1,k2):
    if(n1>n2):
        return "First"
    else:
        return "Second"
n1,n2,k1,k2=map(int,input().split())
print(solve(n1,n2,k1,k2))

n1, n2, k1, k2 = map(int, raw_input().split())
while True:
    if n1 - 1 < 0:
        print "Second"
        break
    n1-=1
    if n2 - 1 < 0:
        print "First"
        break
    n2-=1

n = [int(i) for i in input().split(" ")]
print('First') if n[0] > n[1] else print('Second')

#
#   513A. Game
#

n1, n2, k1, k2 = map(int, raw_input().strip().split())

while n1 != 0 and n2 != 0:
    n1 -= 1
    n2 -= 1

if n1 == 0:
    print 'Second'
else:
    print 'First'

a,b,c,d=map(int,raw_input().split())
if a>b:
    print "First"
else:
    print "Second"

import sys

def main():

    n1,n2,k1,k2 = map(int, sys.stdin.readline().split())

    while True:
        n1-=1
        if n1 == 0:
            sys.stdout.write('Second')
            break
        n2-=1
        if n2 == 0:
            sys.stdout.write('First')
            break

if __name__ == '__main__':
    main()

n1,n2,k1,k2=map(int,input().split())
if n1>n2:
	print("FIRST")
else:
	print("SECOND")

a, b, c, d=map(int, input().split())
if a+c>b+d:
  print("First")
elif b+d>a+c:
  print("Second")

a = input().split()
if a[0] > a[1]:
    print("First")
else:
    print("Second")

[n1, n2, k1, k2] = [int(x) for x in input().split()]
print('Second' if (n1+n2)%2 == 0 else 'First')

def main():
	n1,n2,k1,k2 = map(int, raw_input().split())
	if n1<n2:
		print "Second"
	else:
		print "First"

main()

def ct(n,k) :
    if n%k != 0 :
        return n/k+1
    else :
        return n/k
n1,n2,k1,k2=map(int,raw_input().split())

if ct(n1,k1) <= ct(n2,k2) :
    print "First"
else :
    print "Second"

n1, n2, k1, k2 = list(map(int, input().split()))

if k1 > k2:
    print('First')
elif k2 > k1:
    print('Second')
elif n1 > n2:
    print('First')
elif n2 > n1:
    print('Second')

n,m,k1,k2=[int(t) for t in input().split()]
if n>=m:
    print('Second')
else:
    print('First')

n1,n2,k1,k2 = map(int, input().split())
print('First' if n1//k1 >= n2//k1 else 'Second')

n1,n2,k1,k2 = map(int, input().split())
if n1>n2:
    print('FIRST')
else:
    print('SECOND')

k = input()
e = ' '
b = ''
l = len(k)
array = [0 for i in range(4)]
c = 0
c1 = 0
a = 0

for i in range(l):
    if(k[i] == e):
        c = c + 1
for i in range(l):
    if(k[i] != e):
        b = b + k[i]
    else:
        array[a] = int(b)
        b = ''
        a = a + 1
    c1 = c1 + 1
    if(c1 == l):
        array[a] = int(b)

n1 = array[0]
n2 = array[1]
k1 = array[2]
k2 = array[3]

supp_1 = n1
supp_2 = n2

if((supp_1 - 1) > supp_2):
    print("First")
else:
    print("Second")

k=list(map(int,input().split()))
if k[2]>=k[1]:
  print("First")
else:
  print("Second")

a, b, c, d = map(int, input().split())
s = 1
if c > d:
    print('First')
else:
    print('Second')

n1,n2,k1,k2=map(int,input().split())
if n1>n2:
    print("First")
elif n2>n1:
    print("Second")
else:
    if k1>=k2:
        print("First")
    else:
        print("Second")

num1 = input()
a = []

def get_the_data(count, num, arr):
    for i in range(0, len(num)):
        if num[i] == ' ':
            arr.append(int(num[count:i]))
            count = i+1
        elif i == len(num)-1:
            arr.append(int(num[count:len(num)]))
    return arr

arr1 =  get_the_data(0, num1,  a)
player1 = arr1[0]
player1_balls = arr1[2]
player2 = arr1[1]
player2_balls = arr1[3]
i = 1
while player1 >  0  or player2 > 0:
    if i%2 == 1:
        player1 -= 1
    else:
        player2 -= 1
    i += 1
print(i)
if i%2 == 1:
    print("Second")
else:
    print("First")

''''
if player1 - player2_balls <= 0:
            player2 -= player2_balls
        else:s

'''

n1,n2,m1,m2 = map(int,raw_input().split())
if n2 >=n1:
    print "First"
else:
    print "Seond"

"""
██╗ ██████╗ ██╗    ██████╗  ██████╗  ██╗ █████╗
██║██╔═══██╗██║    ╚════██╗██╔═████╗███║██╔══██╗
██║██║   ██║██║     █████╔╝██║██╔██║╚██║╚██████║
██║██║   ██║██║    ██╔═══╝ ████╔╝██║ ██║ ╚═══██║
██║╚██████╔╝██║    ███████╗╚██████╔╝ ██║ █████╔╝
╚═╝ ╚═════╝ ╚═╝    ╚══════╝ ╚═════╝  ╚═╝ ╚════╝
"""
__author__ = "Dilshod"
n1, n2, k1, k2 = list(map(int, input().split()))
if n1 < n2:
	print("Second")
if n1 == n2:
	if k1 > k2:
		print("First")
	elif k1 < k2:
		print("Second")
	else:
		print("First")
else:
	print("First")

# int(input())
# [int(s) for s in input().split()]
# input()

def solve():
    n1 ,n2, k1, k2 = [int(s) for s in input().split()]
    if n1 >= n2:
        print("Second")
    else:
        print("First")

if __name__ == "__main__":
    solve()

n1,n2,k1,k2 = map(int,raw_input().split(' '))

if n1 >= n2:
    print "First"
else:
    print "Second"

a=input().split()
if int(a[0])>int(a[1]):
	print("First")
elif int(a[0])<int(a[1]):
	print("Second")
else:
	if int(a[2])>=int(a[3]):
		print("First")
	else:
		print("Second")

n1,n2,k1,k2=map(int,raw_input().split())
if n1>n2:print "FIRST"
else:print"SECOND"

import sys

def main():

    n1,n2,k1,k2 = sys.stdin.readline().split()

    if n1 <= n2:
        sys.stdout.write('Second')
    else:
        sys.stdout.write('First')

if __name__ == '__main__':
    main()

nk=map(int,raw_input().split())
if nk[1]-nk[2]<=0:
	print 'First'
elif nk[0]-nk[3]<=0:
	print 'Second'

n,k,l,r= map(int, input().split())
if (n>k):
    print ('first')
elif (n<k):

    print('Second')
else :
    print('second')

x = [int(x) for x in input().split()]

while 1:
    x[1] = x[1] - x[2]
    if x[1] <= 0:
        print('First')
        break
    x[0] = x[0] - x[3]
    if x[0] <= 0:
        print('Second')
        break

n1,n2,k1,k2 = map(int, raw_input().split())
print n1,n2,k1,k2
i=1
while(n1>=0 and n2>=0):
    if(i%2!=0):
        if(n1==0):
            print "Second"
            break
        n1-=1
        if(n2==0):
            print "First"
            break
        n2-=1
    if(i%2==0):
        if(n2==0):
            print "First"
            break
        n2-=1
        if(n1==0):
            print "Second"
            break
        n1-=1
    i+=1

n1,n2,k1,k2=map(int,input().split())
if n1==n2:
    if k1>k2:
        print("First")
    else:
        print("Second")
else:
    if n1>n2:
        print("First")
    else:
        print("Second")

n1,n2,k1,k2 = map(int, raw_input().split())

t1 = n1*k1
t2 = n2*k2

if t1 > t2:
	print 'First'
else:
	print 'Second'

n1,n2,k1,k2=list(map(int,input().split()))
c,d=0,0
while(n1!=0 and n2!=0):
    c+=k1
    d+=k2
    n1-=k1
    n2-=k2
if(c>=d):
    print('First')
else:
    print('Second')

a,b,c,d = raw_input().split()
if a>=b:
    print "Second"
else:
    print "First"

l=list(map(int,input().split()))
if (l[0]>l[1]):
    print("First")
elif (l[1]>l[0]):
    print("Second")
else:
    if (l[2]>l[3]):
        print("First")
    elif (l[3]>l[2]):
        print("Second")
    else:
        print("Second")

import sys
n1,n2,k1,k2=raw_input().split()

if n1 == n2:
	print "Second\n"
elif n1>n2:
	print "First\n"
else:
	print "Second\n"

a = list(map(int, input().strip().split()))
if a[0] - a[2] > a[1] - a[3]:
    print("first")
if a[0] - a[2] < a[1] - a[3]:
    print("Second")

n1, n2, k1, k2 = map(int, input().split(" "))

min_throw = min(k1, k2)
first, second = (n1 - min_throw), (n2 - min_throw)

if first > second :
    print("first")
else :
    print("second")

values = raw_input()
n1, n2, k1, k2  = values.split(" ")

if n1 <= n2:
	print "Second"
else:
	print "First"

n1, n2, k1, k2 = map(int, input().split())
if k1 ^ k2 == 0:
	print('First')
else:
	print('Second')

n1,n2,k1,k2=map(int,input().split())
if n1>n2:
    print("First")
elif n2>n1:
    print("Second")
else:
    if k1>=k2:
        print("Second")
    else:
        print("First")

n1, n2, k1, k2 = map(int, input().split())

if n1 == n2:
    if k1 >= k2:
        print("First")
    else:
        print("Second")
elif n1 > n2:
    print("First")
else:
    print("Second")

n1,n2,k1,k2 = map(int,raw_input().split(' '))

if n1 >= n2:
    print "First"
else:
    print "Second"

l=input().split()
if l[0]>l[1]:
	print("Second")
else:
	print("First")

if __name__ == '__main__':
    n1, n2, k1, k2 = [int(num) for num in raw_input().split()]

    print 'Second' if n2 > n1 else 'First' # ?

n1, n2, k1, k2 = map(int,input().split())
m1 = (n1//k1)+(n1%k1)
m2 = (n2//k2)+(n2%k2)

if  m1 == m2:
    print('First')
elif m1>m2:
    print('Second')
else:
    print('First')

a, b, c, d = map(int,input().split())
if a > b:
    print('First')
elif a < b:
    print("Second")
else:
    if c > d:
        print('First')
    elif d >= c:
        print("Second")

n1,n2,k1,k2=input().split()
if n1>n2:
    print('First')
else:
    print('Second')

a, b, c, d = input().split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)
if a > b:
	print('first')
elif a < b:
	print('second')
else:
	print('second')

# 1481038598079

n1, n2, k1, k2 = list(map(int, input().split()))

if n1 > 1 and n2 > 1:
    if int(n1/k1) > int(n2/k2):
        print("Second")
    else:
        print("First")
else:
    if n1 == 1:
        print("Second")
    if n2 == 1:
        print("First")

n1, n2, *b = map(int, input().split())
print(['first','second'][n1 <= n2])

n1,n2,k1,k2 = list(map(int,input().split()))

if n1>n2:
    print("First")
else:
    print("Secoond")

if(__name__=='__main__'):
    n1,n2,k1,k2=map(int,input().split())
    if(n1==n2):
        if(n1%2==0):
            print("Second")
        else:
            print("First")
    else:
        print("First" if n1>n2 else "Second")

def game(n1,n2,k1,k2):
	while n1 > 0 or n2 > 0:
		n1 = n1 - 1
		if n1 == 0:
			print "Second"
			break
		n2 = n2 - 1
		if n2 == 0:
			print "First"
			break

game(2,1,1,1)

inp = input()

p1, p2, d1, d2 = inp.split(" ")

if p1 <= p2:
    print("Second")
else:
    print("First")

import sys
n1,n2,k1,k2=raw_input().split()

if n1 == n2:
	print "Second\n"
elif n1>n2:
	print "First\n"
else:
	print "Second\n"

n1, n2, k1, k2 = map(int,input().split())

if k1 == k2:
    if n1 > n2:
        print('First')
    else:
        print('Second')

elif n1 - k1 != 0 or n2 - k2 != 0:
    if n1 - k1 > n2 - k2:
        print('First')
    else:
        print('Second')

else:
    while n1 != 0 and n2 != 0:
        for i in range(min(k1,k2)):
            n1 -= 1
            # print(n1)
            n2 -= 1
            # print(n2)

    if n1 == 0:
        print('Second')
    else:
        print('First')

n1,n2,k1,k2=map(int,input().split())
while n1<0 or n2<0:
    n1=n1-k1
    n2=n2-k2
if n1<n2:
    print('First')
else:
    print('Second')

n1, n2, k1, k2 = map(int, input().split())

if n1 == n2 == k1 == k2:
    print("Second")
elif n1 == n2:
    if k1 >= k2:
        print("First")
    else:
        print("Second")
elif n1 > n2:
    print("First")
else:
    print("Second")

n1,n2,k1,k2 = map(int, raw_input().split())

t1 = n1*k1
t2 = n2*k2

if t1 > t2:
	print 'First'
else:
	print 'Second'

n1,n2,k1,k2=map(int,input().split())
A=abs(n1-k1)
B=abs(n2-k2)
if n1==n2:
    if k1 >k2:
        print("Second")
    else:
        print("Second")
if A>B:
    print("First")
else:
    print("Second")

n,m,a,b=map(int,input().split(" "))
if n>m:
	print("First")
elif m>n:
	print("Second")
elif m==n:
	if a>b:
		print("First")
	elif b>=a:
		print("Second")

n1, n2, k1, k2 = list(map(int, input().split()))
print("Second" if n2 * k2 > n1 * k1 else "First")

n,m,k1,k2=[int(t) for t in input().split()]
if n>m:
    print('Second')
else:
    print('First')

n1,n2,k1,k2 = map(int,(raw_input().split()))

if k1 < k2:
    print "Second"
else:
    print "First"

n,m,k,l=map(int,input().split())
if(n>m):
 print("first")
else:
 print("second")

a, b, c, d=map(int, input().split())
if a+c>b+d:
  print("First")
elif b+d>a+c:
  print("Second")

n= input().split()

n1= int(n[0])
n2= int(n[1])
k1= int(n[2])
k2= int(n[3])

p1= n1*k1

p2= n2*k2

if p1>p2:
    print("First")
else:
    print("Second")

def mod():
  a,b,c,d=input().split(" ")
  if a>b:
    print("First")
  else:
    print("Second")

mod()

# http://codeforces.com/problemset/problem/513/A
n1, n2, k1, k2 = [int(x) for x in input().split()]
temp = min(k1, k2)
while(1):
	if ( (n1 <= 0) ):
		print("Second")
		break
	elif ( (n2 <= 0) ):
		print("First")
		break
	n1 -= temp
	n2 -= temp

n1, n2, *b = map(int, input().split())
print(['first','second'][n1 <= n2])

n1,n2,k1,k2 = map(int, input().split())
if n1>n2:
    print('FIRST')
else:
    print('SECOND')

n,k,l,r= map(int, input().split())
if (n>k):
    print ('first')
elif (n<k):

    print('Second')
else :
    print('second')

if(__name__=='__main__'):
    n1,n2,k1,k2=map(int,input().split())
    if(n1==n2):
        print("Secnod")
    else:
        print("First" if n1>n2 else "Second")

n1,n2,k1,k2=map(int,input().split())
while n1<0 or n2<0:
    n1=n1-k1
    n2=n2-k2
if n1<n2:
    print('First')
else:
    print('Second')

import os
n1, n2, k1, k2 = map(int, input().split())
if n1 > n2:
    print("First")
else:
    print('Second')
print(os.getcwd())

n,m,k,l=map(int,input().split())
if n==m:
	if k>l:
		print("First")
	elif l>k:
		print("Second")
elif n>m:
	print("First")
elif m>n:
	print("Second")

"""
██╗ ██████╗ ██╗    ██████╗  ██████╗  ██╗ █████╗
██║██╔═══██╗██║    ╚════██╗██╔═████╗███║██╔══██╗
██║██║   ██║██║     █████╔╝██║██╔██║╚██║╚██████║
██║██║   ██║██║    ██╔═══╝ ████╔╝██║ ██║ ╚═══██║
██║╚██████╔╝██║    ███████╗╚██████╔╝ ██║ █████╔╝
╚═╝ ╚═════╝ ╚═╝    ╚══════╝ ╚═════╝  ╚═╝ ╚════╝
"""
__author__ = "Dilshod"
n1, n2, k1, k2 = list(map(int, input().split()))
if n1 < n2:
	print("Second")
elif n1 == n2:
	if k1 < k2:
		print("First")
	elif k1 > k2:
		print("Second")
	else:
		print("Second")
else:
	print("First")

n1, n2, k1, k2 = map(int, raw_input().split())
while True:
    n1 -= k1
    if n1 <= 0:
        print "First"
        break
    n2 -= k2
    if n2 <= 0:
        print "Second"
        break

nk=map(int,raw_input().split())
if nk[1]-nk[2]==0:
	print 'First'
else:
	print 'Second'

n1,n2,k1,k2 = map(int,raw_input().split(' '))

if n1 >= n2:
    print "First"
else:
    print "Second"

nk=map(int,raw_input().split())
if nk[0]-nk[3]==0:
	print 'Second'
else:
	print 'First'

n1, n2, k1, k2 = map(int, raw_input().split())
print ['First', 'Second'][n1 > n2]

def mod():
  a,b,c,d=input().split(" ")
  if a+c>b+d:
    print("first")
  else:
    print("second")

mod()

n1,n2,k1,k2=map(int,input().split())
if n1>n2:
    print('FIRST')
else:
    print('SECOND')

a, b, c, d = map(int,input().split())
if a+c > b+d:
    print('First')
elif b+d > a+c:
    print('Second')


You are given a tree with $$$n$$$ nodes. You have to write non-negative integers on its edges so that the following condition would be satisfied:For every two nodes $$$i$$$, $$$j$$$, look at the path between them and count the sum of numbers on the edges of this path. Write all obtained sums on the blackboard. Then every integer from $$$1$$$ to $$$\lfloor \frac{2n^2}{9} \rfloor$$$ has to be written on the blackboard at least once. It is guaranteed that such an arrangement exists.

The first line contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$) — the number of nodes. Each of the next $$$n-1$$$ lines contains two integers $$$u$$$ and $$$v$$$ ($$$1 \le u, v \le n$$$, $$$u \neq v$$$), meaning that there is an edge between nodes $$$u$$$ and $$$v$$$. It is guaranteed that these edges form a tree.

Output $$$n-1$$$ lines, each of form $$$u$$$ $$$v$$$ $$$x$$$ ($$$0 \le x \le 10^6$$$), which will mean that you wrote number $$$x$$$ on the edge between $$$u$$$, $$$v$$$.  Set of edges $$$(u, v)$$$ has to coincide with the set of edges of the input graph, but you can output edges in any order. You can also output ends of edges in an order different from the order in input.

NoteIn the first example, distance between nodes $$$1$$$ and $$$2$$$ is equal to $$$2$$$, between nodes $$$2$$$ and $$$3$$$ to $$$1$$$, between $$$1$$$ and $$$3$$$ to $$$3$$$.In the third example, numbers from $$$1$$$ to $$$9$$$ (inclusive) will be written on the blackboard, while we need just from $$$1$$$ to $$$5$$$ to pass the test.

import math

n    = int(input())

if n == 1:
    print()
else:
    edge = [list(map(int, input().split())) for i in range(1, n) ]
    g    = {}

    for x, y in edge:
        if x not in g:
            g[x] = []
        if y not in g:
            g[y] = []

        g[x].append(y)
        g[y].append(x)

    def find_centroid(g):
        p    = {}
        size = {}

        p[1] = -1
        Q    = [1]

        i = 0
        while i < len(Q):
            u = Q[i]

            for v in g[u]:
                if p[u] == v: continue
                p[v] = u
                Q.append(v)
            i+=1

        for u in Q[::-1]:
            size[u] = 1

            for v in g[u]:
                if p[u] == v:
                    continue
                size[u] += size[v]

        cur = 1
        n = size[cur]

        while True:
            max_ = n - size[cur]
            ind_ = p[cur]

            for v in g[cur]:
                if v == p[cur]: continue

                if size[v] > max_:
                    max_ = size[v]
                    ind_ = v

            if max_ <= n // 2:
                return cur

            cur = ind_

    def find_center(g):
        d    = {}
        d[1] = 0
        Q    = [(1, 0)]

        while len(Q) > 0:
            u, dis = Q.pop(0)

            for v in g[u]:
                if v not in d:
                    d[v] = dis +1
                    Q.append((v, d[v]))

        max_length = -1
        s = None

        for u, dis in d.items():
            if dis > max_length:
                max_length = dis
                s = u

        d   = {}
        pre = {}
        d[s] = 0
        Q = [(s, 0)]

        while len(Q) > 0:
            u, dis = Q.pop(0)

            for v in g[u]:
                if v not in d:
                    pre[v] = u
                    d[v]   = dis +1
                    Q.append((v, d[v]))

        max_length = -1
        e = None

        for u, dis in d.items():
            if dis > max_length:
                max_length = dis
                e = u

        route = [e]
        while pre[route[-1]] != s:
            route.append(pre[route[-1]])

        print(route)
        return route[len(route) // 2]

    root = find_centroid(g)
    p    = {}
    size = {}
    Q    = [root]
    p[root] = -1

    i = 0
    while i < len(Q):
        u = Q[i]

        for v in g[u]:
            if p[u] == v: continue
            p[v] = u
            Q.append(v)
        i+=1

    for u in Q[::-1]:
        size[u] = 1

        for v in g[u]:
            if p[u] == v:
                continue
            size[u] += size[v]

    gr    = [(u, size[u]) for u in g[root]]
    gr    = sorted(gr, key=lambda x:x[1])
    thres = math.ceil((n-1) / 3)
    sum_  = 0

    gr1 = []
    gr2 = []
    i = 0

    while sum_ < thres:
        gr1.append(gr[i][0])
        sum_ += gr[i][1]
        i+=1

    while i < len(gr):
        gr2.append(gr[i][0])
        i+=1

    def asign(u, W, ew):
        if size[u] == 1:
            return

        cur = 0
        for v in g[u]:
            if v == p[u]: continue

            first = W[cur]
            ew.append((u, v, first))

            W_  = [x - first for x in W[cur+1: cur+size[v]]]
            asign(v, W_, ew)

            cur+=size[v]

    a, b = 0, 0
    for x in gr1:
        a += size[x]

    for x in gr2:
        b += size[x]

    arr_1 = [x for x in range(1, a+1)]
    arr_2 = [i*(a+1) for i in range(1, b+1)]
    ew    = []

    cur = 0
    for u in gr1:
        first = arr_1[cur]
        ew.append((root, u, first))
        W_    = [x - first for x in arr_1[cur+1:cur+size[u]]]

        cur += size[u]
        #print(u, W_)
        asign(u, W_, ew)

    cur = 0
    for u in gr2:
        first = arr_2[cur]
        ew.append((root, u, first))
        W_    = [x - first for x in arr_2[cur+1:cur+size[u]]]

        cur += size[u]
        #print(u, W_)
        asign(u, W_, ew)

    for u, v, w in ew:
        print('{} {} {}'.format(u, v, w))

import math

n    = int(input())

if n == 1:
    print()
else:
    edge = [list(map(int, input().split())) for _ in range(n-1) ]
    g    = {}

    for x, y in edge:
        if x not in g:
            g[x] = []
        if y not in g:
            g[y] = []

        g[x].append(y)
        g[y].append(x)

    def find_center(g):
        d    = {}
        d[1] = 0
        Q    = [(1, 0)]

        while len(Q) > 0:
            u, dis = Q.pop(0)

            for v in g[u]:
                if v not in d:
                    d[v] = dis +1
                    Q.append((v, d[v]))

        max_length = -1
        s = None

        for u, dis in d.items():
            if dis > max_length:
                max_length = dis
                s = u

        d   = {}
        pre = {}
        d[s] = 0
        Q = [(s, 0)]

        while len(Q) > 0:
            u, dis = Q.pop(0)

            for v in g[u]:
                if v not in d:
                    pre[v] = u
                    d[v]   = dis +1
                    Q.append((v, d[v]))

        max_length = -1
        e = None

        for u, dis in d.items():
            if dis > max_length:
                max_length = dis
                e = u

        route = [e]
        while pre[route[-1]] != s:
            route.append(pre[route[-1]])

        return route[len(route) // 2]

    root = find_center(g)
    p    = {}
    size = {}
    Q    = [root]
    p[root] = -1

    i = 0
    while i < len(Q):
        u = Q[i]

        for v in g[u]:
            if p[u] == v: continue
            p[v] = u
            Q.append(v)
        i+=1

    for u in Q[::-1]:
        size[u] = 1

        for v in g[u]:
            if p[u] == v:
                continue
            size[u] += size[v]

    gr    = [(u, size[u]) for u in g[root]]
    gr    = sorted(gr, key=lambda x:x[1])
    thres = math.ceil((n-1) / 3)
    sum_  = 0

    gr1 = []
    gr2 = []
    i = 0

    while sum_ < thres:
        gr1.append(gr[i][0])
        sum_ += gr[i][1]
        i+=1

    while i < len(gr):
        gr2.append(gr[i][0])
        i+=1

    def asign(u, W, ew):
        if size[u] == 1:
            return

        cur = 0
        for v in g[u]:
            if v == p[u]: continue

            first = W[cur]
            ew.append((u, v, first))

            W_  = [x - first for x in W[cur+1: cur+size[v]]]
            asign(v, W_, ew)

            cur+=size[v]

    a, b = 0, 0
    for x in gr1:
        a += size[x]

    for x in gr2:
        b += size[x]

    arr_1 = [x for x in range(1, a+1)]
    arr_2 = [i*(a+1) for i in range(1, b+1)]
    ew    = []

    cur = 0
    for u in gr1:
        first = arr_1[cur]
        ew.append((root, u, first))
        W_    = [x - first for x in arr_1[cur+1:cur+size[u]]]

        cur += size[u]
        #print(u, W_)
        asign(u, W_, ew)

    cur = 0
    for u in gr2:
        first = arr_2[cur]
        ew.append((root, u, first))
        W_    = [x - first for x in arr_2[cur+1:cur+size[u]]]

        cur += size[u]
        #print(u, W_)
        asign(u, W_, ew)

    for u, v, w in ew:
        print('{} {} {}'.format(u, v, w))


A necklace can be described as a string of links ('-') and pearls ('o'), with the last link or pearl connected to the first one.  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.

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.

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

s = raw_input()

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

if pearls == 0:
    print "YES"
else:
    if links%pearls == 0:
        print "YES"
    else:
        print "NO"

s = raw_input().strip()
a = s.count('o')
b = s.count('-')
if a == 0:
	print "YES"
elif (b%a) == 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")

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

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

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 = raw_input();
L = list(s);

a = 0;
b = 0;

for ch in L :
	if ch == "o" :
		b += 1;
	else :
		a += 1;
if b == 0 or a % b == 0:
	print "YES";
else :
	print "NO";

s = input()

p = s.count('o')
l = s.count('-')

print('YES' if p < 2 or l % p == 0 else '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()
p = s.count('o')
n = len(s)
if p == 0 or n % p == 0:
    ans = 'YES'
else:
    ans = 'NO'
print(ans)

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

x = raw_input()
l = 0
p = 0
for j in x:
    if(j == "O" or j == "o"):
        p+=1
    elif(j=="-"):
        l += 1
if(p!= 0 and l != 0):
    if(l%p == 0):
        print "YES"
        exit()
    print "NO"
    exit()

print "YES"

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

chain = raw_input()
b,l = 0,0
for x in chain:
    if x == 'o':
        b+=1
    else:
        l+=1
if b == 0:
    print 'YES'
elif l%b == 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')

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

if __name__ == "__main__":
    Solution = CodeforcesTask980ASolution()
    Solution.read_input()
    Solution.process_task()
    print(Solution.get_result())

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")
if __name__ == "__main__":
    main()

s = input()

o = s.count("o")
if o == 0:
    print("YES")
    exit()
print("YES" if (len(s) - o) % o == 0 else "NO")

s = raw_input()
p = s.count("o")
if p == 0:
    print "YES"
else:
    l = len(s)-p
    if l%p==0: print "YES"
    else: print "NO"

import sys
raw_input = sys.stdin.readline
s = raw_input()
a = s.count('o')
b = s.count('-')
print "YES" if a == 0 or b % a == 0 else "NO"

inp = raw_input()
i = 0
pearls = 0
while i < len(inp):
	if inp[i] == "o":
		pearls = pearls + 1
	i = i + 1
if pearls == 0:
	print("YES")
	exit()
links = 0
while links < len(inp):
	inp2 = "o" * pearls
	inp2 += "-" * links
	if sorted(inp) == sorted(inp2):
		print("YES")
		exit()
	links = links + pearls
print("NO")

def main():
	necklace = raw_input()

	items = []
	linkcounter = 0
	pearlcounter = 0

	for item in necklace:
		items.append(item)

	for item in items:
		if item == "-":
			linkcounter += 1
		else:
			pearlcounter += 1

	if pearlcounter != 0 and linkcounter % pearlcounter != 0:
		print "NO"
	else:
		print "YES"

main()

s = raw_input().strip()
dash = s.count('-')
pear = s.count('o')

if pear == 0:
    print "YES"
    exit()

if dash % pear == 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()
try:
	if s.count('-') % s.count('o') == 0:
		print('YES')
	else:
		print('NO')
except:
	print('YES')

s = raw_input()
a = s.count('-')
b = s.count('o')
if a == 0 or b == 0:
    print 'YES'
elif a % b == 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")

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

S = raw_input()

T = S.count('-')
B = S.count('o')

def get_answer(t, b):
	if t == 0 or b == 0:
		return 'YES'
	if t % b == 0:
		return 'YES'
	else:
		return 'NO'

answer = get_answer(T, B)
print(answer)

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

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

string = input()
ss = string.count('-')
os = string.count('o')

if os == 0:
    print("YES")
elif ss%os == 0:
    print("YES")
else:
    print("NO")

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

d = {'o': 0, '-': 0}
for x in raw_input():
    d[x] += 1

if d['o']>0:
    print 'NO' if d['-'] % d['o'] else 'YES'
else:
    print 'YES'

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

# -*- coding: utf-8 -*-
#!/usr/bin/python

if __name__ == '__main__':
    s = raw_input()
    l_num = len(s.replace('o', ''))
    p_num = len(s.replace('-', ''))
    print "NO" if p_num and l_num % p_num else "YES"

s=input()

l=s.count('-')
o=s.count('o')

if o==0:
    print("YES")
elif l % o == 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()
slen = len(s)
cnt1 = s.count('o')
cnt2 = slen - cnt1
if cnt1 == 0:
    print('YES')
else:
    if (cnt2 % cnt1 == 0):
        print('YES')
    else:
        print('NO')

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

necklace = raw_input()
pearls, links = [necklace.count(x) for x in ['o', '-']]
if pearls == 0:
    print 'YES'
else:
    print 'YES' if links % pearls == 0 else 'NO'

s = raw_input()
l = s.count('-')
p = s.count('o')

if p == 0:
    print 'YES'
else:
    print 'YES' if l % p == 0 else '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')

txt=raw_input()
l=txt.count('-');p=len(txt)-l
if l==0 or p==0:
  print "YES"
else:
  print ["NO","YES"][l%p==0]

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

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

'''
Author: Abdurasul
'''
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')

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

s = input()
o = s.count('o')
d = s.count('-')
if(d == 0 or o == 0):
	print("YES")
elif(d/o == int(d/o)):
	print("YES")
else:
	print("NO")

s = raw_input().strip()
dash = s.count('-')
pear = s.count('o')

if pear == 0:
    print "YES"
    exit()

if dash % pear == 0:
    print "YES"
else:
    print "NO"

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

#https://codeforces.com/problemset/problem/980/A
s=input()
l=s.count('-')
p=len(s)-l

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

s = raw_input();
L = list(s);

a = 0;
b = 0;

for ch in L :
	if ch == "o" :
		b += 1;
	else :
		a += 1;
if b == 0 or a % b == 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")

###### TESTTTTT ###

s=list(raw_input())
pearl=0
link=0
for l in s:
	if l=='o':
		pearl+=1
	else:
		link+=1

#print link,pearl

if pearl==0:
	print "YES"
elif link==0:
	print "YES"
else:
	if link%pearl==0:
		print "YES"
	else:
		print "NO"

s=input()

l=s.count('-')
o=s.count('o')

if o==0:
    print("YES")
elif l % o == 0:
    print("YES")
else:
    print("NO")

from sys import stdin
ans = "YES"
s = stdin.readline().strip()
n = s.count('-')
m = s.count('o')
if m and n%m:
 ans = "NO"
print ans

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

a = raw_input()
cnt1 = 0
cnt2 = 0

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

s = input()
print("YES" if (s.count("o") == 0 or s.count("-") % s.count("o") == 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")

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

s = raw_input()

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

if pearls == 0:
    print "YES"
else:
    if links%pearls == 0:
        print "YES"
    else:
        print "NO"

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
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")

'''input
-o---

'''
from collections import defaultdict as df
from bisect import bisect_left as bl
from itertools import combinations as c
import sys
from math import factorial as F
from random import randint as R
import heapq
#sys.setrecursionlimit(1000000)
s=raw_input().strip()
n1=s.count("o")
n2=s.count("-")
if n2==0 or n1==0:
	print "YES"
else:
	if n2%n1==0:
		print "YES"
	else:
		print "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')

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

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

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

necklace = raw_input()
pearls, links = [necklace.count(x) for x in ['o', '-']]
if pearls == 0:
    print 'YES'
else:
    print 'YES' if links % pearls == 0 else 'NO'

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

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

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()
ans="YES"
a = s.count('o')
b = s.count('-')
if  a and b % a :
    ans="NO"
print (ans)

# Hello World program in Python
s=input().strip()
l=len(s)
p=s.count('-')
q=l-p
if q==0:
    print('YES')
else:
    if p%q==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")

# import sys
# sys.stdin=open("input1.in","r")
# sys.stdout=open("output2.out","w")
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")
else:
	if count1%count2==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')

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

s = input()
slen = len(s)
cnt1 = s.count('o')
cnt2 = slen - cnt1
if cnt1 == 0:
    print('YES')
else:
    if (cnt2 % cnt1 == 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')
else:
 if count1%count2==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()
print('YES' if s.count('-') % (s.count('o') or 1) is 0 else 'NO')

s = raw_input().strip()
dash = s.count('-')
pear = s.count('o')

if pear == 0:
    print "YES"
    exit()

if dash % pear == 0:
    print "YES"
else:
    print "NO"

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

inp = input()

if(inp.count("-") % 2 == 0 and inp.count("o") > 1):
    print("YES")
else:
    print("NO")

s = input()

if s.count('-') % 2 == 0:
	print('YES')
else:
	print('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):
        return "YES"
    else:
        if(b%a==0):
            return "YES"
        else:
            return "NO"

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
    else:
        if(x+y)%2!=0:
            print("N0")
    t = t -1

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:
        return "YES"
    elif string.count("o")%2 != 0 and string.count("-")%2 != 0:
        return "YES"
    elif string.count("o")%2 != 0 and string.count("-") == string.count("o")*2:
        return "YES"
    else:
        return "NO"

string = input()
ans = answer(string)
print(ans)

def PearlsAndLinks():
    necklace = raw_input()
    pearls = 0
    links = 0
    for i in necklace:
        if i == 'o':
            pearls += 1
        else:
            links += 1

    if  pearls != 0 and links%pearls == 0:
        print 'YES'
    else:
        print 'NO'

PearlsAndLinks()

x=input()
s=0
q=0
l=0
for i in x:
    if i=='-':
        if l==1:
            s+=1
        else:
            q+=1
    else:
        i=='o'
        l+=1
if x==1:
    print("NO")
else:
    if s<=q:
        print('YES')
    else:
        print("NO")

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

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
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==0 or c1%c2==0 or c2%c1==0):
	print("YES")
else:
	print("NO")

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

if a%2 == 0 and b%2==0:
	print("YES")
elif b%2!=0 and a%2==0:
	print("YES")
elif a==0:
	print("YES")
else:
	print("NO")

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

inp = input()

if(inp.count("-") % 2 == 0 and inp.count("o") > 0):
    print("YES")
else:
    print("NO")

s = input()
o = s.count('o')
m = s.count('-')
if o == 1:
    print("YES")
else:
    if not m:
        print("YES")
    else:
        if not o:
            print("NO")
        else:
            if max(o, m) % min(o, m) == 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:
    print("NO")
else:
    print("YES")

#               - -
#              o    o
#
#
#

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")
else:
	if not(circulos % equis) :
		print("YES")
	else:
		print("NO")

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

elif a % b == 0:
    print("YES")

else:
    print("NO")

s = raw_input()
b, n = s.count("o"), s.count("-")
print ("NO", "YES")[n*b not in (0, b) and (n%b==0 or b%n==0)]

# import sys
# sys.stdin=open("input.in",'r')
# sys.stdout=open("output4.out",'w')
s=input()
if s.count("o")==1:
	print("YES")
else:
	if s.count("-")%2==0:
			if s.count("-")%s.count("o")==0:
				print("YES")

	else:
		print("NO")

# import sys
# sys.stdin=open("input.in",'r')
# sys.stdout=open("output4.out",'w')
s=input()
if s.count("o")<=1:
	print("YES")
else:
	if s.count("-")%2==0:
			if s.count("-")%s.count("o")==0:
				print("YES")

	else:
		print("NO")

neck = raw_input()

pearls, links = 0, 0
for s in neck :
    if s == '-' : links += 1
    elif s == 'o' : pearls += 1

if pearls > 0 and links % pearls == 0 and (links/pearls)%2 == 0 : print "YES"
elif pearls == 0 and links % 2 == 0 : print "YES"
else : print "NO"

n=input()
k=n.count("-")
if n.count("o")<1:
 print("YES")
 quit(0)
if k%2==0:
 print("YES")
else:
 print("NO")

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

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

x=input()
s=0
q=0
l=0
for i in x:
    if i=='-':
        if l==1:
            s+=1
        else:
            q+=1
    else:
        i=='o'
        l+=1
if s<=q:
    print('YES')
else:
    print("NO")

# cook your dish here
o=0
d=0
s = input()
for i in s:
    if i=='o':
        o+=1
    else:
        d+=1
if o==0:
    print("NO")
elif d%o == 0:
    print("YES")
elif d==0:
    print("YES")
else:
    print("NO")

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

# UBCF
# CodeForcesian
# ♥
# من مات تصویر توئم

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:
    print("NO")
else:
    print("YES")

#               - -
#              o    o
#
#
#

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

from random import randint
enter = randint(0,1)
if enter == 1:
	print("YES")
else:
	print("NO")

def answer(string):
    print(string.count("o"), string.count("-"))
    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:
        return "YES"
    elif string.count("o")%2 != 0 and string.count("-") == string.count("o")*2:
        return "YES"
    else:
        return "NO"

string = input()
ans = answer(string)
print(ans)

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:
        return "YES"
    else:
        return "NO"

string = input()
ans = answer(string)
print(ans)

x=input()
s=0
q=0
l=0
for i in x:
    if i=='-':
        if l==1:
            s+=1
        else:
            q+=1
    else:
        i=='o'
        l+=1
if l==1:
    print("YES")
else:
    if s<=q:
        print('YES')
    else:
        print("NO")

array = input()
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")
    else:
        if(b%a==0):
            print("YES")
        else:
            print("NO")

def Links_and_Pearls(array):
    return "NO"
    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):
        return "YES"
    else:
        if(b%a==0):
            return "YES"
        else:
            return "NO"

s = raw_input()
b, n = s.count("o"), s.count("-")
print ("NO", "YES")[n*b not in (0, b) and (n%b==0 or b%n==0)]

x=input()
s=0
q=0
l=0
for i in x:
    if i=='-':
        if l==1:
            s+=1
        else:
            q+=1
    else:
        i=='o'
        l+=1
if l==1:
    print("NO")
else:
    if s<=q:
        print('YES')
    else:
        print("NO")

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

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

s = input()

o = s.count("o")
if o == 0:
    print("NO")
    exit()
print("YES" if (len(s) - o) % o == 0 else "NO")

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

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

if a%2 == 0 and b%2==0:
	print("YES")
elif b%2!=0 and a%2==0:
	print("YES")
elif a==0 and b>0:
	print("YES")
elif a>0 and b==0:
	print("YES")
else:
	print("NO")

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

inp = input()

if(inp.count("-") % 2 == (inp.count("-") % 2) or "o" not in inp):
    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("NO")
else:
    if a % b == 0:
        print("YES")
    else:
        print("NO")

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

def Links_and_Pearls(array):
    lists = list(array)
    a = 0
    b = 0
    i = 0
    while(array[i]):
        if(array[i] == "o"):
            a = a + 1
        else:
            b = b + 1
        i = i + 1
    if(a == 0):
        return YES
    else:
        if(b%a==0):
            return YES
        else:
            return NO

def Links_and_Pearls(array):
    lists = list(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):
        return YES
    else:
        if(b%a==0):
            return YES
        else:
            return NO

s=input()
tmp=0
n=len(s)
start=0
for i in range(n):
    if s[i]=='o':
        start=i
        break
tmp=0
l=[]
for i in range(start+1,n):
    if s[i]=='o':
        l.append(tmp)
        tmp=0
    elif i==n-1 and s[i]=='-':
        tmp+=1
        for j in range(0,start):
            tmp+=1
        l.append(tmp)
        break
    else:
        tmp+=1
if len(list(filter(lambda x: x%2==0,l)))==0 or len(list(filter(lambda x: x%2==1,l)))==0:
    print("Yes")
else:
    print("No")

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

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

main()

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

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:
        return "YES"
    elif string.count("o")%2 != 0 and string.count("-") == string.count("o")*2:
        return "YES"
    else:
        return "NO"

string = input()
ans = answer(string)
print(ans)

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

if a%2 == 0 and b%2==0:
	print("YES")
elif b%2!=0 and a%2==0:
	print("YES")
elif a==0:
	print("YES")
else:
	print("NO")

a = raw_input()
cnt1 = 0
cnt2 = 0

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

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

def Links_and_Pearls(array):
    print("NO")

from random import randint
enter = randint(0,1)
if enter == 1:
	print("YES")
else:
	print("NO")

strr = input()

count = 0

for i in range(len(strr)):
    if strr[i] == '-':
        count += 1

if (count % 2 == 0):
    print("YES")
else:
    print("NO")

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

# UBCF
# CodeForcesian
# ♥
# هیس

s = input()

print("YES" if s.count('-') % 2 == 0 or s.count("o") == 0 else "NO")

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

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
    else:
        if(x+y)%2!=0:
            print("N0")
    t = t -1

inp = input()

if( ((inp.count("-") % 2) == (inp.count("o") % 2)) or "o" not in inp):
    print("YES")
else:
    print("NO")

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

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

if a%2 == 0 and b%2==0:
	print("YES")
elif b%2!=0 and a%2==0:
	print("YES")
elif a==0:
	print("YES")
elif b==0:
	print("NO")
else:
	print("NO")

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

s = raw_input()
b = s.count("o")
n = s.count("-")
print ("NO", "YES")[n*b not in (0,n,b) and n%b==0 or b%n==0]

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

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

n = raw_input()

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

if a*b == 0 or ( a>b and a%b == 0) or (b>a and b%a==0) :
    print 'YES'
else :
    print 'NO'

def Links_and_Pearls(array):
    print("YES")

s = input()
o = s.count('o')
d = s.count('-')
if(o > 2  and d != 0):
	print("NO")
elif(o == 2 and d%2 == 1):
	print("NO")
else:
	print("YES")

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

s = input()

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

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

if b == 0 or a == 0:
    print('YES')
elif a == 1:
    print('YES')
else:
    if b%a == 0 and b <= a:
        print('YES')
    else:
        print('NO')

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

n=list(input())
x=n.count("-")
z=n.count("o")
if z!=0 and x%z==0:
	print("YES")
elif z==0:
	print("NO")
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 and c1%c2==0:
    print("YES")
else:
    print("NO")

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

def Links_and_Pearls(array):
    lists = list(array)
    a = 0
    b = 0
    for x in lists:
        if(x is 'o'):
            a = a + 1
        else:
            b = b + 1
    if(a == 0):
        return YES
    else:
        if(b%a==0):
            return YES
        else:
            return NO

inp = input()

if( ((inp.count("-") % 2) == (inp.count("o") % 2)) or "o" not in inp):
    print("YES")
else:
    print("NO")

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

print(time.time()-startTime)

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

inp = input()

if(inp.count("-") % 2 == 0 or "-" not in inp):
    print("YES")
else:
    print("NO")

n = raw_input()

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

if a*b == 0 or  a%b == 0 :
    print 'YES'
else :
    print 'NO'

s=input()
o=s.count('o')
w=s.count('-')
if(o==0 or w==0):
    print("YES")
else:
    temp=abs(o-w)
    if(temp==1 and abs(o-w)==1):
        print("NO")
    elif(temp%min(o,w)==0):
        print("YES")
    else:
        print("NO")

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

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