Harryxun/stf_run huggingface dataset:
if a<0 and c<0:
    print(a*c)
elif b>=0 and d>=0:
    print(b*d)
elif b<0 and c>=0:
    print(b*c)
elif a>=0 and d<0:
    print(a*d)
else:
    if a*c>=b*d:
        print(a*c)
    else:
        print(b*d)

### FIXED CODE ###

a,b,c,d=map(int,input().split())

if b<0 and d<0:
    print(a*c)
elif a>=0 and c>=0:
    print(b*d)
elif b<0 and c>=0:
    print(b*c)
elif a>=0 and d<0:
    print(a*d)
else:
    if a*c>=b*d:
        print(a*c)
    else:
        print(b*d)
l = [int(i) for i in range(input().split()]
print('YES') if  l.count(5) == 2 and l.count(7) == 1 else print('NO') 
                        

### FIXED CODE ###

l = [int(i) for i in  input().split()]
print('YES') if  l.count(5) == 2 and l.count(7) == 1 else print('NO')
def main():
    d = list(input())
    alp = [chr(i) for i in range(65, 65 + 26)]

    for x in range(len(d)):
        idx = alp.index(d[x]) - 3
        if idx < 0:
            idx = 26 - idx
        else:
            pass
        d[x] = alp[idx]

    ans = ""
    for x in d:
        ans += x
    print(ans)


if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    d = list(input())
    alp = [chr(i) for i in range(65, 65 + 26)]

    for x in range(len(d)):
        idx = alp.index(d[x]) - 3
        if idx < 0:
            idx = 26 + idx
        else:
            pass
        d[x] = alp[idx]

    ans = ""
    for x in d:
        ans += x
    print(ans)


if __name__ == "__main__":
    main()
s = input()
if s == 'Sunny':
    print('Cloudy')
elif s ==  'Cloudy':
    print('Rainy'):
else:
    print('Sunny')


### FIXED CODE ###

s = input()
if s == 'Sunny':
    print('Cloudy')
elif s ==  'Cloudy':
    print('Rainy')
else:
    print('Sunny')
A,B,C=map(int,input().split())
if A+B+C==5*5*7 :
  print("YES")
  else:
    print("NO")

### FIXED CODE ###

A,B,C=map(int,input().split())
if A*B*C==(5*5*7) :
  print("YES")
else:
  print("NO")
S = list(input())
length = len(S)
if length == 2:
    ans = 0
if length % 2 == 1:
    length -= 1
    ans = 0
else:
    length -= 2

def hantei(list_str,n):
    k = int(n/2)
    if list_str[0:k] == list_str[k:n]:
        return n
    else:
        return 0

while length != 2:
        ans = hantei(S,length)
        if ans != 0:
            break
        length -= 2

if ans == 0 :
    print(1)
else:
    print(ans)

### FIXED CODE ###

def hantei(list_str,n):
    k = int(n/2)
    if list_str[0:k] == list_str[k:n]:
        return n
    else:
        return 0
S = list(input())
length = len(S)
flag = 0
if length == 2:
    print(0)
    flag = 1
elif length == 3:
    length -= 1
    ans = hantei(S,2)
    print(ans)
    flag = 1
elif length % 2 == 1:
    length -= 1
    ans = 0
else:
    length -= 2
    ans = 0
while length >= 2:
        ans = hantei(S,length)
        if ans != 0:
            break
        length -= 2

if flag == 0:
    if ans == 0:
        print(1)
    else:
        print(ans)
a = list(input())
print(a.count('1')


### FIXED CODE ###

a = input()
print(a.count('1'))
x, y = map(str, input())
if ord(x) < ord(y):
    ans = '<'
elif ord(x) > ord(y):
    ans = '>'
else:
    ans = '='

print(ans)

### FIXED CODE ###

x, y = map(str, input().split())
if ord(x) < ord(y):
    ans = '<'
elif ord(x) > ord(y):
    ans = '>'
else:
    ans = '='

print(ans)
import itertools

DIM = int(input())
args = [int(input()) for a in range(DIM)]
temp = list(map(lambda x:x%10, args))
if sum(temp) == 0:
    exit(0)
i = DIM
while(i>0):
    comb = list(itertools.combinations(args, i))
    combMax = list(map(sum, comb))
    for c in sorted(combMax, reverse=True):
        if c%10==0:
            continue
        else:
            exit(c)
    i = i -1
print(0)
exit()

### FIXED CODE ###

import itertools

DIM = int(input())
args = [int(input()) for a in range(DIM)]
temp = list(map(lambda x:x%10, args))
if sum(temp) == 0:
    print(0)
    exit()
i = DIM
while(i>0):
    comb = list(itertools.combinations(args, i))
    combMax = list(map(sum, comb))
    for c in sorted(combMax, reverse=True):
        if c%10==0:
            continue
        else:
            print(c)
            exit()
    i = i -1
print(0)
exit()
X,N = [int(x) for x in input().split()]
p = [int(x) for x in input().split()]

if N != 0:
    sorted_p = sorted(p)
    flag = 0

    for x in range(N-1):
        diff = abs(X - sorted_p[x])
        if diff == 0:
            flag = 1
            break
        if diff <= abs(X-sorted_p[x+1]):
            break

    def checknum(d,loweridx,upperidx):
        upper = sorted_p[upperidx]
        lower = sorted_p[loweridx]
        if X-d == lower:
            if X+d == upper:
                if loweridx == 0:
                    print(X-d-1)
                elif upperidx == N-1:
                    print(X+d+1)
                else:
                    checknum(d+1,loweridx-1,upperidx+1)
            elif X-d == lower and X+d != upper:
                print(X+d)        
        else:
            return print(X-d)

    checknum(1,x-1,x+1)
else:
    print(X)

### FIXED CODE ###

X,N = [int(x) for x in input().split()]
p = [int(x) for x in input().split()]

for d in range(X+1):
    for f in [-1,1]:
        a = X + d*f
        if p.count(a) == 0:
            print(a)
            exit()
s = input()

print(x * len(s))

### FIXED CODE ###

s = input()
 
print('x' * len(s))
n = int(input())
c = list(map(int, input().split()))
c.sort(rexerse=True)
a = sum([v for i, v in enumerate(c) if i % 2 == 0 ]
b = sum([v for i, v in enumerate(c) if i % 2 == 1 ]
print(a - b)

### FIXED CODE ###

n = int(input())
c = list(map(int, input().split()))
c.sort(reverse=True)
a = sum([v for i, v in enumerate(c) if i % 2 == 0 ])
b = sum([v for i, v in enumerate(c) if i % 2 == 1 ])
print(a - b)
x = input("1??\???100??\????????´??°?????\?????????????????????: ")
num = x * x * x
print(num, end="\n")

### FIXED CODE ###

x = int(input(""))
if (x >= 1) or (x <= 100):
    num = x ** 3 
    print(num, end="\n")
else:
    pass
x=int(a)
if a==0:
   print (1)
elif a==1:
   print(0)

### FIXED CODE ###

x=int(input())

if x==0:
  print(1)
elif x==1:
  print(0)
N = int(input())
A_list = list(map(int, input().split()))
B_list = [a - (i + 1) for i, a in enumerate(A_list)]
B_list.sort()
b = B_list[len(B_list) / 2]
s = sum([abs(B - b) for B in B_list])
print(s)

### FIXED CODE ###

N = int(input())
A_list = list(map(int, input().split()))
print(max(A_list) - min(A_list))
n = int(input())
x = input()

outf = {}
res = []

dec_d = {}
def get_dec(bin):
  if bin in dec_d.items():
    return dec_d[bin]
  s = 0
  seed = 2 ** (len(bin)-1)
  for el in bin:
    if el == '1':
      s += seed
    seed = seed // 2
  dec_d[bin] = s
  return s

bin_d = {}
def get_bin(dec):
  if dec in bin_d.items():
    return bin_d[dec]
  s = ''
  while dec > 0:
    if dec % 2 == 1:
      s = s + '1'
    else:
      s = s + '0'
    dec = dec // 2
  bin_d[dec] = s
  return s

pop_d = {}
def popcount(n):
  if n in pop_d.items():
    return pop_d[n]
  out = 0
  while n > 0:
    if n % 2 == 1:
      out += 1
    n = n // 2
  pop_d[n] = out
  return out


for i in range(n):
  if x[i] == '0':
    x = x[:i] + '1' + x[i+1:]
  else:
    x = x[:i] + '0' + x[i+1:]
  x_dec = get_dec(x)
  res.append(x_dec)

  # calc f
  kp = []
  f = 0
  while x_dec > 0:
    st = get_bin(x_dec)
    if st in outf.items():
      f += outf[st]
      break
    kp.append(x_dec)
    f += 1
    pc = popcount(x_dec)
    x_dec = x_dec % pc

  # keep
  lf = f
  for k in kp:
    st = get_bin(k)
    outf[st] = lf
    lf -= 1

  if x[i] == '0':
    x = x[:i] + '1' + x[i+1:]
  else:
    x = x[:i] + '0' + x[i+1:]


for i in res:
  st = get_bin(i)
  print(outf[st])


### FIXED CODE ###

n = int(input())
x = input()

init_pop_cnt = x.count('1')
init_pop_cnt_less = init_pop_cnt - 1
init_pop_cnt_more = init_pop_cnt + 1

valid_l = init_pop_cnt_less != 0

# x's state after f
init_res_less = 0
init_res_more = 0
seed_more = 1
seed_less = 1
for i in range(1, n+1):
  xp = x[-1 * i]
  if xp == '1':
    if valid_l:
      init_res_less += seed_less % init_pop_cnt_less
    init_res_more += seed_more % init_pop_cnt_more
  if valid_l:
    seed_less = (seed_less * 2) % init_pop_cnt_less
  seed_more = (seed_more * 2) % init_pop_cnt_more


dif_less = [0] * (2 * 10**5 + 100)
dif_more = [0] * (2 * 10**5 + 100)
if valid_l:
  dif_less[0] = 1 % init_pop_cnt_less
dif_more[0] = 1 % init_pop_cnt_more
for i in range(1, n+1):
  if valid_l:
    dif_less[i] = (dif_less[i-1] * 2) % init_pop_cnt_less
  dif_more[i] = (dif_more[i-1] * 2) % init_pop_cnt_more


def get_pc(dec):
  out = 0
  while dec > 0:
    if dec % 2 == 1:
      out+=1
    dec = dec // 2
  return out

def f(dec):
  pc = get_pc(dec)
  return dec % pc

cnt = [0] * (2 * 10**5 + 200)

for i in range(1, 2 * 10**5 + 100):
  c = 0
  cur = i
  while cur > 0:
    c += 1
    cur = f(cur)
  cnt[i] = c

for i in range(n):
  xi = x[i]

  if xi == '1':
    if valid_l:
      lx = init_res_less
      lx -= dif_less[n-i-1]
      lx %= init_pop_cnt_less
      print((cnt[lx] % init_pop_cnt_less) + 1)
    else:
      print(0)
  else:
    lx = init_res_more
    lx += dif_more[n-i-1]
    lx %= init_pop_cnt_more
    print((cnt[lx] % init_pop_cnt_more) + 1)
n, r = map(int, input().split())
if n >= 10:
    print(r)
else:
    print(r + 100(10-n))

### FIXED CODE ###

n, r = map(int, input().split())
if n >= 10:
    print(r)
else:
    print(r + 100*(10-n))
def main():
  import sys
  input=sys.stdin.readline
  h,w,k=map(int,input().split())
  sx,sy,tx,ty=map(int,input().split())
  calc=lambda x,y:x*1000007+y
  b=[[-1]*(w+2)]
  for i in range(h):
    s=input()
    bb=[-1]
    for j in s:
      if j==".":bb.append(0)
      else:bb.append(-1)
    bb.append(-1)
    b.append(bb)
  b.append([-1]*(w+2))
  from collections import deque
  d=deque()
  d.append(calc(sx,sy))
  s=set()
  while d:
    x,y=divmod(d.popleft(),1000007)
    if calc(x,y)in s:
      s.discard(calc(x,y))
      continue
    if x==tx and y==ty:
      exit(print(b[x][y]))
    for i in range(1,k+1):
      if b[x-i][y]<=b[x][y] and b[x-i][y]!=0:break
      d.append(calc(x-i,y))
      if b[x-i][y]!=0:
        s.add(clac(x-i,y))
      b[x-i][y]=b[x][y]+1
    for i in range(1,k+1):
      if b[x+i][y]<=b[x][y] and b[x+i][y]!=0:break
      d.append(calc(x+i,y))
      if b[x+i][y]!=0:
        s.add(calc(x+i,y))
      b[x+i][y]=b[x][y]+1
    for j in range(1,k+1):
      if b[x][y-j]<=b[x][y] and b[x][y-j]!=0:break
      d.append(calc(x,y-j))
      if b[x][y-j]!=0:
        s.add(calc(x,y-j))
      b[x][y-j]=b[x][y]+1
    for j in range(1,k+1):
      if b[x][y+j]<=b[x][y] and b[x][y+j]!=0:break
      d.append(calc(x,y+j))
      if b[x][y+j]!=0:
        s.add(calc(x,y+j))
      b[x][y+j]=b[x][y]+1
  print(-1)
if __name__ == "__main__":
  main()

### FIXED CODE ###

import sys
input=sys.stdin.readline
h,w,k=map(int,input().split())
si,sj,ti,tj=map(int,input().split())
si-=1
sj-=1
ti-=1
tj-=1
b=[input()for _ in range(h)]
ans=[[-1]*w for _ in range(h)]
ans[si][sj]=0
from collections import deque
d=deque()
d.append((si,sj))
while d:
  x,y=d.popleft()
  if x==ti and y==tj:
    exit(print(ans[x][y]))
  for dx,dy in [[1,0],[-1,0],[0,-1],[0,1]]:
    for i in range(1,k+1):
      xx=x+dx*i
      yy=y+dy*i
      if not(0<=xx<h and 0<=yy<w) or b[xx][yy]=="@":break
      if 0<=ans[xx][yy]<=ans[x][y]:break
      if ans[xx][yy]==-1:d.append((xx,yy))
      ans[xx][yy]=ans[x][y]+1
print(-1)
a=input().strip().split(" ")

b=[int(i) for i in a]

for i in range(2):
    if(b[i]==1):
        b[i]="13"
    else:
        b[i]=b[i]-1

if(b[0]>b[1]):
    print("Alice")
elif(b[0]==b[1]):
    print("Draw")
else:
    print("Bob")



### FIXED CODE ###

a=input().strip().split(" ")

b=[int(i) for i in a]

for i in range(2):
    if(b[i]==1):
        b[i]=int(13)
    else:
        b[i]=b[i]-1

if(b[0]>b[1]):
    print("Alice")
elif(b[0]==b[1]):
    print("Draw")
else:
    print("Bob")
import random

w = input()

if w == "Sunny":
    print("Cloudy")
elif w == "Cloudy":
    print("Rainy")
elif W == "Rainy":
    print("Sunny")

### FIXED CODE ###

import random

w = input()

if w == "Sunny":
    print("Cloudy")
elif w == "Cloudy":
    print("Rainy")
elif w == "Rainy":
    print("Sunny")
A,B = map(str, input().split())


# Ar = int(A[::-1])
A = int(A)
B = int(B)

# print(Ar)
# print(A)
# print(B)

count = 0
while A <= B:
  As = str(A)
  Ar = int(As[::-1])

  if A == Ar:
    # print("Yes")
    count+=1
  else:
    # print("No")
  A +=1

print(count)

### FIXED CODE ###

A,B = map(str, input().split())


# Ar = int(A[::-1])
A = int(A)
B = int(B)

# print(Ar)
# print(A)
# print(B)

count = 0
while A <= B:
  As = str(A)
  Ar = int(As[::-1])

  if A == Ar:
    # print("Yes")
    count+=1
  A +=1

print(count)
# https://beta.atcoder.jp/contests/agc025/tasks/agc025_b
from functools import reduce
import operator as op

MOD = 998244353
mod_inv = [0, 1]


def init_mod_inv(n):
    for i in range(2, n + 1):
        ans = MOD - (MOD // i) * mod_inv[MOD % i] % MOD
        mod_inv.append(ans)
    return ans


def main():
    n, a, b, k = map(int, input().split())

    init_mod_inv(n)
    nCr = [0] * (n + 1)
    nCr[0] = 1
    for i in range(1, n):
        nCr[i] = nCr[i - 1] * (n - i + 1) * mod_inv[i] % MOD

    ways = 0
    for x in range(0, n + 1):
        yb = k - a * x
        if yb >= 0 and yb % b == 0 and yb // b <= n:
            ways += nCr[x] * nCr[yb // b]
            ways %= MOD
    print(ways)


if __name__ == "__main__":
    main()


### FIXED CODE ###

# https://beta.atcoder.jp/contests/agc025/tasks/agc025_b
from functools import reduce
import operator as op

MOD = 998244353
mod_inv = [0, 1]


def init_mod_inv(n):
    for i in range(2, n + 1):
        ans = MOD - (MOD // i) * mod_inv[MOD % i] % MOD
        mod_inv.append(ans)


def main():
    n, a, b, k = map(int, input().split())

    init_mod_inv(n)
    nCr = [0] * (n + 1)
    nCr[0] = 1
    for i in range(1, n+1):
        nCr[i] = (nCr[i - 1] * (n - i + 1) * mod_inv[i]) % MOD

    ways = 0
    for x in range(0, n + 1):
        yb = k - a * x
        if yb >= 0 and yb % b == 0 and yb // b <= n:
            ways += nCr[x] * nCr[yb // b]
            ways %= MOD
    print(ways)


if __name__ == "__main__":
    main()
MM = input().split()
A = int(MM[0])
B = int(MM[1])
list1 =[]
for i in range(A):
  aa = input()
  if '.'*B == aa:
    pass
  else:
    list1.append(list(aa))


for i in range(B):
  count = 0
  for j in range(len(list1)):
    if list1[j][i] == '#':
      count +=1
  if count == 0:
    for j in range(len(list1)):
     
      list1[j][i] = 'a'

for i in list1:
  i.remove('a')

for i in list1:
  for j in i:
    print(j,end='')
  print()

### FIXED CODE ###

MM = input().split()
A = int(MM[0])
B = int(MM[1])
list1 =[]
for i in range(A):
  aa = input()
  if '.'*B == aa:
    pass
  else:
    list1.append(list(aa))


for i in range(B):
  count = 0
  for j in range(len(list1)):
    if list1[j][i] == '#':
      count +=1
  if count == 0:
    for j in range(len(list1)):
     
      list1[j][i] = 'a'

for i in list1:
  if 'a' in i:
    i.remove('a')

for i in list1:
  for j in i:
    if j != 'a':
      print(j,end='')
  print()
n. k = map(int, input().split())
if(n == k):
  print('Yes')
else:
  print('No')


### FIXED CODE ###

n, k = map(int, input().split())
if(n == k):
  print('Yes')
else:
  print('No')
n, m = map(int, input().split())
A = list(map(int, input().split()))
BC = [list(map(int, input().split())) for _ in range(m)]

A.sort()
BC.sort(key=lambda x:x[1], reverse=True)

pos = 0
for b, c in BC:
    for i in range(pos, pos + b):
        if A[i] <= c:
            A[i] = c
        else:
            break
    pos = i + 1
    if pos >= n:
        break

print(sum(A))

### FIXED CODE ###

n, m = map(int, input().split())
A = list(map(int, input().split()))
BC = [list(map(int, input().split())) for _ in range(m)]

A.sort()
BC.sort(key=lambda x:x[1], reverse=True)

pos = 0
for b, c in BC:
    end = (pos + b) if pos + b <= n else n
    for i in range(pos, end):
        if A[i] < c:
            A[i] = c
        else:
            break
    pos = i + 1
    if pos >= n:
        break

print(sum(A))
n=input()
k=input()
x=input()
y=input()
if n>k:
    n-=k
else:
    k=n
    n=0
print(k*x+n*y)


### FIXED CODE ###

n=input()
k=input()
x=input()
y=input()
if n>k:
    n-=k
else:
    k=n
    n=0
print(k*x+n*y)
s=input()
print(s**3)


### FIXED CODE ###

s=input()
a=s**3
print(a)
int A = input(stdin)
int B = input(stdin)

if(A > 2 * B):
  return A - 2 * B
else:
  return 0

### FIXED CODE ###

A, B = map(int,input().split())
 
if(A > 2 * B):
  print(A - 2 * B)
else:
  print("0")
import Collections
A,B=map(int,input().split())
def gcd(a,b):
  if b == 1:
    return a
  return furui(b,a%b)

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

print(len(collections.Counter(prime_factorize(gcd(A,B)).keys)+1)


### FIXED CODE ###

import collections
A,B=map(int,input().split())
def gcd(a,b):
  if b == 0:
    return a
  return gcd(b,a%b)

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

print(len(list(collections.Counter(prime_factorize(gcd(A,B))).keys()))+1)
n = int(input())
l = list(map(int, input().split()))
l.sort()
print("Yes") if sum(l[:n]) < l[n] else print("No")

### FIXED CODE ###

n = int(input())
l = list(map(int, input().split()))
l.sort()
print("Yes") if sum(l[:n-1]) > l[n-1] else print("No")
a,b=map(int,input().split())
s=input()
print(s[:k-1]+s[k-1].lower+s[k:])

### FIXED CODE ###

a,b=map(int,input().split())
s=input()
print(s[:b-1]+s[b-1].lower()+s[b:])
a, b, n = map(int, input().split())


if (n >=b):
  x=int(n/b)*b-1
  print (int(a*x/b)-a*int(x/b))
else:
  xmax=0
  for x in range(1,n+1):
    atai=int(a*x/b)-a*int(x/b)
    if (atai >= xmax): xmax=atai
  print (xmax)

### FIXED CODE ###

import sys
k = int(input())
a, b = map(int, input().split())

for i in range(1,1000):
  kk=k*i
  if (kk >= a and kk <= b):
    print ('OK')
    sys.exit()
  if (kk > b):
    print ('NG')
    sys.exit()
n = int(input())
ss = []
cnt = 0

# for _ in range(n):
#     ss.append(input())

# for i, s1 in enumerate(ss[0:n-2+1]):
#     for s2 in ss[i + 1:n-1+1]:
#         # print(s1, s2)
#         if sorted(s1) == sorted(s2):
#             cnt += 1

for _ in range(n):
    ss.append(input())

map = {}
for s in ss:
    sorted_s = ''.join(sorted(s))
    if sorted_s in map.keys():
        map[sorted_s] += 1
    else:
        map[sorted_s] = 1


# map = {'a': 1, 'b': 2, 'c': 3, 'd': 4}

# print(map)


def factorial(n):
    if n > 0:
        return n * factorial(n-1)
    else:
        return 1

# あとはxC2の組み合わせの総数を求めれば良い


for n in map.values():
    if n > 1:
        cnt += factorial(n) // (2 * factorial(n-2))
    # print(n)
    # print(cnt)

print(cnt)

### FIXED CODE ###

n = int(input())
ss = []
cnt = 0

# for _ in range(n):
#     ss.append(input())

# for i, s1 in enumerate(ss[0:n-2+1]):
#     for s2 in ss[i + 1:n-1+1]:
#         # print(s1, s2)
#         if sorted(s1) == sorted(s2):
#             cnt += 1

for _ in range(n):
    ss.append(input())

map = {}
for s in ss:
    sorted_s = ''.join(sorted(s))
    if sorted_s in map.keys():
        map[sorted_s] += 1
    else:
        map[sorted_s] = 1


# map = {'a': 1, 'b': 2, 'c': 3, 'd': 4}
# map = {'a': 10 ** 5}  # maxテスト
# print(map)

# あとはxC2の組み合わせの総数を求めれば良い


for n in map.values():
    if n > 1:
        # cnt += factorial(n) // (2 * factorial(n-2))
        cnt += (n * (n - 1)) // 2
    # print(n)
    # print(cnt)

print(cnt)
s=list(input())
for i in s:
  i=int(i)

if s[0]+s[1]+s[2]+s[3]==7:
  print('s[0]+s[1]+s[2]+s[3]=7')
if s[0]+s[1]+s[2]-s[3]==7:
  print('s[0]+s[1]+s[2]-s[3]=7')
if s[0]+s[1]-s[2]+s[3]==7:
  print('s[0]+s[1]-s[2]+s[3]=7')
if s[0]-s[1]+s[2]+s[3]==7:
  print('s[0]-s[1]+s[2]+s[3]=7')
if s[0]-s[1]+s[2]-s[3]==7:
  print('s[0]-s[1]+s[2]-s[3]=7')
if s[0]-s[1]-s[2]+s[3]==7:
  print('s[0]-s[1]-s[2]+s[3]=7')
if s[0]+s[1]-s[2]-s[3]==7:
  print('s[0]+s[1]-s[2]-s[3]=7')
if s[0]-s[1]-s[2]-s[3]==7:
  print('s[0]-s[1]-s[2]-s[3]=7')

### FIXED CODE ###

import sys
S=input()
a,b,c,d=S[0],S[1],S[2],S[3]
lst=['+','-']
for i in lst:
  for j in lst:
    for k in lst:
      if eval(a+i+b+j+c+k+d+'==7'):
        print(a+i+b+j+c+k+d+'=7')
        sys.exit()
def solve(n):
  m = 0
  while n > 0:
    m += n%10
    n //= 10
  if m%n:print("No")
  else:print("Yes")

n = int(input())
solve(n)

### FIXED CODE ###

N=int(input())
n=N
a=0
while n!=0:
    a+=n%10
    n=n//10
if N%a==0:
    print('Yes')
else:
    print('No')
k,s=open(0);n,r=map(int,k.split());a=0
while n>0:
 n-=1
 if s[n]<"o":n-=~-r;a=-~max(a,n)
print(a)

### FIXED CODE ###

from itertools import*
_, *a = map(int, open(0))
print(sum(sum(l)//2 for _, l in groupby(a, key=lambda x:x>0)))
a,b,c = map(int, input().split)

if a+b >= c:
	print('Yes')
else:
	print('No')

### FIXED CODE ###

a,b,c = map(int, input().split())

if a+b >= c:
	print('Yes')
else:
	print('No')
A=list(map(lambda x: int(x), False), input().split()))
A+=list(map(lambda x: (int(x), False), input().split()))
A+=list(map(lambda x: (int(x), False), input().split()))

N = int(input())
for _ in range(N):
  n = int(input())
  for a, b in A:
    if a == n:
      b = True
if (A[0][1] and ((A[1][1] and A[2][1]) or \
                       (A[3][1] and A[6][1]) or \
                       (A[4][1] and A[8][1])) or \
          (A[1][1] and A[4][1] and A[7][1]) or \
          (A[2][1] and A[5][1] and A[8][1]) or \
          (A[3][1] and A[4][1] and A[5][1]) or \
          (A[6][1] and A[7][1] and A[8][1]) or \
          (A[2][1] and A[4][1] and A[6][1]):
    print("YES")
else:
    print("No")

### FIXED CODE ###

#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(A: "List[List[int]]", N: int, b: "List[int]"):
    A_ = []
    for a_ in A:
        A_ += [[a__, False] for a__ in a_]
    for b_ in b:
        for a__ in A_:
            if a__[0] == b_:
                a__[1] = True
    if (A_[0][1] and ((A_[1][1] and A_[2][1]) or \
                        (A_[3][1] and A_[6][1]) or \
                        (A_[4][1] and A_[8][1]))) or \
            (A_[1][1] and A_[4][1] and A_[7][1]) or \
            (A_[2][1] and A_[5][1] and A_[8][1]) or \
            (A_[3][1] and A_[4][1] and A_[5][1]) or \
            (A_[6][1] and A_[7][1] and A_[8][1]) or \
            (A_[2][1] and A_[4][1] and A_[6][1]):
        print(YES)
    else:
        print(NO)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = [[int(next(tokens)) for _ in range(3)] for _ in range(3)]  # type: "List[List[int]]"
    N = int(next(tokens))  # type: int
    b = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(A, N, b)

if __name__ == '__main__':
    main()
a, b = map(int, input().split())

def f(x):
    if x == 0:
        return x
    return x + f(x - 1)

diff = b - a
east = f(diff)
print(east - b)


### FIXED CODE ###

a, b = map(int, input().split())

import sys

sys.setrecursionlimit(2000)

def f(x):
    if x == 0:
        return x
    return x + f(x - 1)

diff = b - a
east = f(diff)
print(east - b)
n,r = input().split()
if int(n) >= 10:
  h = int(r)
else:
  h = int(r) + (100 * (10-n))
print(h)

### FIXED CODE ###

n,r = input().split()
if int(n) >= 10:
  h = int(r)
else:
  h = int(r) + (100 * (10-int(n)))
print(h)