Harryxun/stf_run huggingface dataset:
a, b, c = map( int, input() )
if a+b+c != 17:
	print( "NO" )
 
iCountFive = 0
if a = 5:
	iCountFive += 1
if b = 5:
	iCountFive += 1
if c = 5:
	iCountFive += 1      
 
iCountSeven = 0
if a = 7:
	iCountSeven += 1
if b = 7:
	iCountSeven += 1
if c = 7:
	iCountSeven += 1      
 
if iCountFive == 2 and iCountSeven == 1:
	print( "YES" )
else :
	print( "NO" )

### FIXED CODE ###


a, b, c = map( int, input().split() )
 
if a == 5 and b == 5 and c == 7:
	print( "YES" )
elif a == 5 and b == 7 and c == 5:
  	print( "YES" )
elif a == 7 and b == 5 and c == 5:
  	print( "YES" )
else :
	print( "NO" )
def f(L):
    if L:
        return 2*f(L[:-1])+L[-1]
    else:
        return 0

N=int(input())
X=input()
Zero="0"*N

X=list(map(int,X))

H=X.count(1)
Z=f(X)
G=1<<N

A=[]
for i in range(N):
    G>>=1
    
    if X[i]==0:
        J=H+1
    else:
        J=H-1
        
    Y=Z^G

    if Y==0:
        A.append(0)
        continue
    
    I=1
    Y=Y%J
    try:
        while True:
            Y=Y%bin(Y).count("1")
            I+=1
    except ZeroDivisionError:
        A.append(I)

print("\n".join(map(str,A)))


### FIXED CODE ###

N=int(input())
X=input()
Y=int(X,2)

J=X.count("1")

A=[0]*N
A[-1]=1
for i in range(2,N+1):
    A[-i]=(A[-(i-1)]*2)%(J+1)

B=[0]*N
if J>1:
    B[-1]=1
    for j in range(2,N+1):
        B[-j]=(B[-(j-1)]*2)%(J-1)


H=[0]*N

Q,R=divmod(Y,J+1)
if J>1:
    S,T=divmod(Y,J-1)
else:
    S=T=0

for i in range(N):
    if X[i]=="0":
        U=(R+A[i])%(J+1)
    else:
        if J==1:
            continue
        U=(T-B[i])%(J-1)
        
        
    I=1
    while U>0:
        U=U%bin(U).count("1")
        I+=1
    H[i]=I

print("\n".join(map(str,H)))
from bisect import bisect_left
from collections import deque
import sys
input = sys.stdin.readline

N = int(input())
A = [int(input()) for _ in range(N)]

q = deque([A[0]])
for i in range(1,N):
    insert_index = bisect_left(q,A[i])
    if insert_index == 0:
        q.insert(0, A[i])
    else:
        q[insert_index-1] = A[i]

print(len(q))


### FIXED CODE ###

from bisect import bisect_left
from collections import deque
import sys
input = sys.stdin.readline

N = int(input())
A = [int(input()) for _ in range(N)]

q = deque([A[0]])
for i in range(1,N):
    insert_index = bisect_left(q,A[i])
    if insert_index == 0:
        q.appendleft(A[i])
    else:
        q[insert_index-1] = A[i]

print(len(q))
a,b,c = map(int,input().split())
count = 0
for i in range(a,b+1) :
    d = c % i
        if d == 0 :
            count += 1
print (count)

### FIXED CODE ###

a,b,c = map(int,input().split())
count = 0
for i in range(a,b+1):
    d = c % i
    if d == 0:
        count += 1
print (count)
N = int(input())
n = int(n**(0.5))
for i in range(n):
  c = n-i
  if N % c == 0:
    a = N/c
print(a+c-2)

### FIXED CODE ###

import sys
input=sys.stdin.buffer.readline
#from collections import defaultdict
#d = defaultdict(int)
#import fractions
#import math
#import collections
#from collections import deque
#from bisect import bisect_left
#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
#import itertools
N = int(input())
n = int(N**(0.5))
for i in range(n):
  c = n-i
  if N % c == 0:
    a = N/c
    break;
print(int(a+c-2))
def main():
    MOD = int(1e9 + 7)
    h, w = map(int, input().split())
    grid = [input() for _ in range(h)]

    dp = [[0] * w for _ in range(h)]
    dp[i][j] = 1

    for i in range(h):
        for j in range(w):
            if grid[i][j] != '#':
                if i > 0:
                    dp[i][j] += dp[i-1][j]

                if j > 0:
                    dp[i][j] += dp[i][j-1]

                if dp[i][j] > MOD:
                    dp[i][j] -= MOD

    ans = dp[h-1][w-1]
    print(ans)



if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    MOD = int(1e9 + 7)
    h, w = map(int, input().split())
    grid = [input() for _ in range(h)]

    dp = [[0] * w for _ in range(h)]

    for i in range(h):
        for j in range(w):
            if grid[i][j] != '#':
                if i == 0 and j == 0:
                    dp[i][j] = 1
                
                if i > 0:
                    dp[i][j] += dp[i-1][j]

                if j > 0:
                    dp[i][j] += dp[i][j-1]

                if dp[i][j] > MOD:
                    dp[i][j] -= MOD

    ans = dp[h-1][w-1]
    print(ans)



if __name__ == "__main__":
    main()
import sys
while True:
    (x, y) = [int(i) for i in sys.stdin.readline().split()]
    if x == 0 == y:
        break
    if x > y:
    
    print(x, y)

### FIXED CODE ###

while True:
    (x, y) = [int(i) for i in input().split()]

    if x < y:
        print(x, y)
    elif x > y:
        print(y, x)
    elif x == y:
        if x == 0 and 0 == y:
            break
        print(x, y)
def candy():
    boxNum, x = [int(i) for i in input().split()]
    ain = input()
    alist = ain.split(' ')

    s = 0
    for i in range(0, boxNum-1):
        c = alist[i] , d = alist[i + 1]
        if int( alist[i] + alist[i + 1] ) > x:
            if int( alist[i] ) >= x:
                alist[i] = x
                alist[i + 1] = 0
            else :
                alist[i + 1] = x - a[i] 
            s += c - alist[i] + d - alist[i + 1]
        /*  
        if int(alist[i]) > x:
            s = s + int(alist[i+1])
            alist[i+1] = 0

        if int(alist[i+1]) + int(alist[i]) > x:
            s = s + (int(alist[i+1]) + int(alist[i]) - x)
            alist[i+1] = x - int(alist[i])
        */
    print(s)
candy()

### FIXED CODE ###

def candy():
    n = []
    n = input().split()
    N = int(n[0])
    x = int(n[1])
    alist = [int(i) for i in input().split()]

    s = 0
    for i in range(0, N - 1):
        c = int(alist[i])
        d = int(alist[i + 1])
        if int( alist[i] + alist[i + 1] ) > x:
            if int( alist[i] ) >= x:
                alist[i] = x
                alist[i + 1] = 0
            else :
                alist[i + 1] = int(x - alist[i] )
            s += c - int(alist[i]) + d - int(alist[i + 1])
        """
        if int(alist[i]) > x:
            s = s + int(alist[i+1])
            alist[i+1] = 0

        if int(alist[i+1]) + int(alist[i]) > x:
            s = s + (int(alist[i+1]) + int(alist[i]) - x)
            alist[i+1] = x - int(alist[i])
        """
    print(s)
candy()
h,w=map(int,input().split())
x=[]
for i in range(1,w):
    x1=[h*i,h*((w-i)//2),h*(w-i)-h*((w-i)//2)]
    x2=[h*i,(w-i)*(h//2),h*(w-i)-(w-i)*(h//2)]
    x.append(min(max(x1)-min(x1),max(x2)-min(x2))
for i in range(1,h):
    x1=[w*i,w*((h-i)//2),w*(h-i)-w*((h-i)//2)]
    x2=[w*i,(h-i)*(w//2),w*(h-i)-(h-i)*(w//2)]
    x.append(min(max(x1)-min(x1),max(x2)-min(x2))
print(min(x))


### FIXED CODE ###

h,w=map(int,input().split())
if h%3==0 or w%3==0:
    print(0)
else:
    x=[]
    for i in range(1,w):
        sub=[]
        sub.append([h*i,h*((w-i)//2),h*(w-i)-h*((w-i)//2)])
        sub.append([h*i,h*((w-i)//2+1),h*(w-i)-h*((w-i)//2+1)])
        sub.append([h*i,(w-i)*(h//2),h*(w-i)-(w-i)*(h//2)])
        sub.append([h*i,(w-i)*(h//2+1),h*(w-i)-(w-i)*(h//2+1)])
        for j in sub:
            x.append(max(j)-min(j))
    for i in range(1,h):
        sub=[]
        sub.append([w*i,w*((h-i)//2),w*(h-i)-w*((h-i)//2)])
        sub.append([w*i,w*((h-i)//2+1),w*(h-i)-w*((h-i)//2+1)])
        sub.append([w*i,(h-i)*(w//2),w*(h-i)-(h-i)*(w//2)])
        sub.append([w*i,(h-i)*(w//2+1),w*(h-i)-(h-i)*(w//2+1)])
        for j in sub:
            x.append(max(j)-min(j))
    print(min(x))
N = int(input())
if N >= 1000:
    a = N - 1000
else:
    a = a
while a >= 1000:
    a = a - 1000
if a != 0:
    a = 1000 - a
print(a)

### FIXED CODE ###

N = int(input())
a = 0
if N >= 1000:
    a = N - 1000
else:
    a = N
while a >= 1000:
    a = a - 1000
if a != 0:
    a = 1000 - a
print(a)
n = int(input())
A = list(input())
A_change={}
B = [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z]
for i in A:
  for j in B:
    if A[i]=B[j]
  A_change[i] = B[(j+n)%26]
print(list(A_change.values()))

### FIXED CODE ###

n = int(input())
s = input()
ans = ""
for i in s:
  ans += chr(ord("A") + (ord(i)-ord("A")+n)%26)
print(ans)
import math

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

test_case = []
for x in (-1, 0, 1):
    for y in (-1, 0, 1):
        test_case.append((x, y))
for i in range(n):
    x1, y1 = xy[i]
    test_case.append((x1, y1))
    test_case.append((-x1, -y1))
    test_case.append((y1, -x1))
    test_case.append((-y1, x1))

ret = 0
for x1, y1 in test_case:
    sx, sy, tx, ty = 0, 0, 0, 0
    for j in range(n):
        x2, y2 = xy[j]
        if x1 * x2 + y1 * y2 > 0 or (x1 * x2 + y1 * y2 == 0 and -y1 * x2 + x1 * y2 >= 0):
            sx += x2
            sy += y2
        else:
            tx += x2
            ty += y2
    ret = max(ret, math.hypot(sx, sy), math.hypot(tx, ty))
print(ret)


### FIXED CODE ###

import sys
sys.setrecursionlimit(500000)

n = int(input())
a = [list(map(int, input().split())) for _ in range(n)]
vs = n * (n - 1) // 2

vmap = {}
c = 0
for i in range(n):
    for j in range(i):
        vmap[(i, j)] = c
        vmap[(j, i)] = c
        c += 1

edges = [[] for _ in range(vs)]
numin = [0] * vs
for i in range(n):
    for j in range(n - 2):
        j1 = a[i][j] - 1
        j2 = a[i][j + 1] - 1
        edges[vmap[(i, j1)]].append(vmap[(i, j2)])
        numin[vmap[(i, j2)]] += 1

order = []
day = [1] * vs
q = [i for i in range(vs) if numin[i] == 0]
while len(q) > 0:
    index = q.pop(0)
    order.append(index)
    d = day[index]
    for i in edges[index]:
        numin[i] -= 1
        if numin[i] == 0:
            q.append(i)
            day[i] = max(day[i], d + 1)

print(max(day) if len(order) == vs else -1)
N, M, K = map(int,input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

import numpy as np

a =[]

if K 

flag = True
while flag:
    if A[0] >= K or B[0] >= K:
        flag = False
    elif not A and not B:
        flag = False
    elif not A:
        a.append(B[0])
        B = B[1:]
    elif not B:
        a.append(A[0])
        A = A[1:]
    elif A[0] <= B[0]:
        a.append(A[0])
        A = A[1:]
    #elif A[0] > B[0]:
    else:
        a.append(B[0])
        B = B[1:]

res = np.cumsum(a)
r = list(res)

cnt = 0
for i in r:
    if i <= K:
        cnt += 1
    else:
        break
print(cnt)

### FIXED CODE ###

N, M, K = map(int,input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

a = [0]
b = [0]
for i in range(N):
    a.append(a[i]+A[i])
for i in range(M):
    b.append(b[i]+B[i])

j=M
ans = 0
for i in range(N+1):
    if a[i] > K:
        break
    while b[j] > K -a[i]:
        j -= 1
    ans = max(ans, i+j)

print(ans)
x,y = map(int,input().split())	
print(max(0,x-2y))

### FIXED CODE ###

x,y = map(int,input().split())	
print(max(0,x-2*y))
s = input()
n = len(s)

if s[0:(n-1)/2] == s[(n+3)/2:]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s = input()
d = len(s)//2
print("Yes" if s[:d] == s[d+1:] else "No")
def pfact(n):
    d = {}
    while n % 2 == 0:
        d[2] = 1 if 2 not in d else d[2] + 1
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            d[f] = 1 if f not in d else d[f] + 1
            n //= f
        else:
            f += 2
    if n != 1:
        d[n] = 1 if n not in d else d[n] + 1
    return d

n = int(input())
d = pfact(n)
L = sorted(d, reverse=True)
a = L[0]
d[L[0]] -= 1
b = 1
for k in L:
    while d[k] > 0:
        if b > a:
            a, b = b, a
        b *= k
        d[k] -= 1
print(max(len(str(a)), len(str(b))))


### FIXED CODE ###

n = int(input())
ans = float('inf')
for a in range(1, int(n ** 0.5) + 1):
    if n / a % 1 == 0:
        b = n // a
        ans = min(ans, max(len(str(a)), len(str(b))))
print(ans)
import collections
import numpy as np

# = input()
# = int(input())
# = map(int, input().split())
# = list(map(int, input().split()))
#

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

if 1 <= A <= 9 and 1 <= B <= 9:
  print(A * B)
  else:
    print(-1)

### FIXED CODE ###

import collections
import numpy as np
 
# = input()
# = int(input())
# = map(int, input().split())
# = list(map(int, input().split()))
#
 
A, B = map(int, input().split())
 
if 1 <= A <= 9 and 1 <= B <= 9:
  print(A * B)
else:
  print(-1)
L, R = map(int, input().split())
Lmin = L % 2019
Rmin = R % 2019
anlis = []

if L-R >= 2019 or Lmin > Rmin:
    print(0)
    
else:
    for j in range(Lmin, Rmin+1):
        for i in range(Lmin, j):
            anlis.append((i * j) % 2019)



print(min(anlis))

### FIXED CODE ###

L, R = map(int, input().split())
Lmin = L % 2019
Rmin = R % 2019
anlis = []

if R-L >= 2018 or Lmin > Rmin:
    print(0)
    
else:
    for j in range(Lmin+1, Rmin+1):
        for i in range(Lmin, j):
            anlis.append((i * j) % 2019)
    print(min(anlis))
x = [[str(j) for j in input().split()] for i in range(3)]
print(x[1][1]+x[2][2]+x[3][3])

### FIXED CODE ###

x = [input() for i in range(3)]
print(x[0][0]+x[1][1]+x[2][2])
n=int(input())
a=list(map(int,input().split()))

fx=0
for i in range(1,n):
    if i%2==0:
        fx+=a[i]
ans=[0]*n
ans[0]=sum(a)-2*fx
for i in range(n-1):
    ans[i+1]=2a[i]-ans[i]
print(*ans)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))

fx=0
for i in range(1,n):
    if i%2==1:
        fx+=a[i]
ans=[0]*n
ans[0]=sum(a)-2*fx
for i in range(n-1):
    ans[i+1]=2*a[i]-ans[i]
print(*ans)
n, k, s = map(int, inputs[0].split())
A = [s]*k + [s-1]*(n-k)
print(*A)

### FIXED CODE ###

n, k, s = map(int, input().split())
A = [s]*(n+1)
b = s+1 if s != 10**9 else 1
for i in range(n-k):
    A[i] = b
print(*A[:n])
N,A,B=input().split()
N=int(N)
A=int(A)
B=int(B)
C=A+B
if (0<C<=10**18)and(0<N<=10**18)and(A>=0)and(B>=0):
    queue="a"*A+"b"*B
    while len(queue)<N:
        queue+="a"*A+"b"*B
    number=queue.count("a",0,N)
    print(number)
else:
    None

### FIXED CODE ###

N,A,B=map(int,input().split())
if (0<A+B<=10**18)and(0<N<=10**18)and(A>=0)and(B>=0):
    if N%(A+B)<=A:
        c=(N//(A+B))*A+N%(A+B)
        print(c)
    else:
        d=(N//(A+B))*A+A
        print(d)
n = int(input())

red = []
blue = []
ed = []
for i in range(n):
    red.append(list(map(int,input().split())))
for i in range(n):
    blue.append(list(map(int,input().split())))


node = n*2
    
for i in range(n):
    for j in range(n):
        if red[i][0]<blue[j][0] and red[i][1]<blue[j][1]:
            ed.append([i,j+n])
            
import random
import numpy as np

node = n

edge = ed

def tutte():
    tut = np.zeros((node,node))
    for e in edge:
        x = random.random()
        tut[e[0]][e[1]]=x
        tut[e[1]][e[0]]=-x
    return tut



times = 11
rank = []
for i in range(times):
    rank.append(np.linalg.matrix_rank(tutte()))
rank.sort()
ans = rank[times//2]//2

print(ans)

### FIXED CODE ###

n = int(input())

red = []
blue = []
ed = []
for i in range(n):
    red.append(list(map(int,input().split())))
for i in range(n):
    blue.append(list(map(int,input().split())))

inf = 10**30

node = n*2+2

for i in range(1,n+1):
    ed.append([0,i,1])
    ed.append([n+i,2*n+1,1])
    
for i in range(n):
    for j in range(n):
        if red[i][0]<blue[j][0] and red[i][1]<blue[j][1]:
            ed.append([i+1,j+n+1,1])
    


edge = len(ed)
start = 0
goal = 2*n+1

"""
limit = [[0 for i in range(node)] for j in range(node)]
for i in edge:
    limit[i[0]][i[1]] += i[2]
"""

limit = [[] for i in range(node)]
for i in ed:
    limit[i[0]].append([i[1],i[2]])
    limit[i[1]].append([i[0],0])

ans = 0
while True:
    used = [False for i in range(node)]
    used[start] = True
    stack = [start]
    pre = [False for i in range(node)] # posの前
    pcos = [inf for i in range(node)] # posまでのコスト
    flg = False
    while stack:
        # print(stack)
        pos = stack.pop()
        for e in limit[pos]:
            if e[1] != 0 and (not used[e[0]]):
                pre[e[0]]=pos
                pcos[e[0]]=e[1]
                stack.append(e[0])
                used[e[0]]=True
                if e[0]==goal:
                    stack = []
                    flg = True
    if flg==False:
        print(ans)
        break
    pos = goal
    root = []
    minicost = inf
    while pos != start:
        root.append(pos)
        minicost = min(minicost,pcos[pos])
        pos = pre[pos]
    root.append(start)
    root.reverse()
    ans += minicost
    for i in range(len(root)-1):
        for j in range(len(limit[root[i]])):
            if limit[root[i]][j][0]==root[i+1]:
                limit[root[i]][j] = [root[i+1],limit[root[i]][j][1]-minicost]
        for j in range(len(limit[root[i+1]])):
            if limit[root[i+1]][j][0] == root[i]:
                limit[root[i+1]][j] = [root[i],limit[root[i+1]][j][1]+minicost]
N = int(input())
H = []*100
H[:] = map(int, input().split())
ct = 1
for i in range(N-1):
    max = max(H[:i+1])
    if H[i+1] >= max:
        ct += 1
print(ct)

### FIXED CODE ###

N = int(input())
H = input().split()
H = [int(h) for h in H]
ct = 1
for i in range(N-1):
    maxim = max(H[:i+1])
    if H[i+1] >= maxim:
        ct += 1
print(ct)
N,M = map(int,input().split())
ls = [0 for _ in range(N)]
flg = 1
for i in range(M):
    a,b = map(int,input().split())
    if ls[a-1] == 0 and ls[b-1]==0:
        ls[a-1]=flg
        ls[b-1]=flg
        flg+=1
    elif ls[a-1] == 0:
        ls[a-1] = ls[b-1]
    elif ls[b-1] == 0:
        ls[b-1] = ls[a-1]
    else:
        check = min(ls[a-1],ls[b-1])
        ls[a-1] = check
        ls[b-1] = check
from statistics import mode
com = mode(ls)
print(ls.count(com))       

### FIXED CODE ###

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

n,m = map(int,input().split())
uf = UnionFind(n)
for i in range(m):
    a,b = map(int,input().split())
    uf.union(a-1,b-1)
ans = 0
for j in range(n):
    check = uf.size(j)
    if ans < check:
        ans = check
print(ans)
import sys
S = input()
K = int(input())
if len(S) == 1:
  print(S)
  sys.exit(0)
if K == 1:
  print(S[0])
i = 0
while i<len(S):
  if S[i] == '1':
  	i += 1
  else:
    break
keep = S[i]
if K <= i:
  print(1)
  sys.exit(0)
else:
  if S[0] != '1':
    print(S[0])
  else:
	  print(keep)

### FIXED CODE ###

import sys
S = input()
K = int(input())
if len(S) == 1:
  print(S)
  sys.exit(0)
if K == 1:
  print(S[0])
  sys.exit(0) #
i = 0
while i<len(S):
  if S[i] == '1':
  	i += 1
  else:
    break
if i < len(S):
  keep = S[i]
else:
  keep = S[i-1]
if K <= i:
  print('1')
  sys.exit(0)
else:
  if S[0] != '1':
    print(S[0])
  else:
	  print(keep)
import collections
H, W = map(int, input().split())
S = [input() for _ in range(H)]
def f():
    q = collections.deque()
    dist = [[float("inf")] * W for _ in range(H)]
    for i in range(H):
        for k in range(W):
            if S[i][k] == '#':
                q.append((i,k))
                dist[i][k] = 0
    dx = [(-1, 0), (1, 0), (0, -1), (0, 1)]
    while len(q) != 0:
        h, w = q.popleft()
        d = dist[h][w]
        for x, y in dx:
            h2 = h + y
            w2 = w + x
            if h2 >= 0 and h2 < W and w2 >= 0 and w2 < H:
                if dist[h2][w2] == float("inf"):
                    dist[h2][w2] = d+1
                    q.append((h2, w2))
    return dist
ans = 0
dist = f()
for i in range(H):
    for k in range(W):
        ans = max(ans,dist[i][k])
print(ans)

### FIXED CODE ###

import collections
H, W = map(int, input().split())
S = [input() for _ in range(H)]
def f():
    q = collections.deque()
    dist = [[float("inf")] * W for _ in range(H)]
    for i in range(H):
        for k in range(W):
            if S[i][k] == '#':
                q.append((i,k))
                dist[i][k] = 0
    dx = [(-1, 0), (1, 0), (0, -1), (0, 1)]
    while len(q) != 0:
        h, w = q.popleft()
        d = dist[h][w]
        for x, y in dx:
            h2 = h + y
            w2 = w + x
            if h2 >= 0 and h2 < H and w2 >= 0 and w2 < W:
                if dist[h2][w2] == float("inf"):
                    dist[h2][w2] = d+1
                    q.append((h2, w2))
    return dist
ans = 0
dist = f()
for i in range(H):
    for k in range(W):
        ans = max(ans,dist[i][k])
print(ans)
a,b=map(int,input().split())
if b % a = 0:
  print(a+b)
else:
  print(b-a)


### FIXED CODE ###

a,b=map(int,input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)
import sys
input = sys.stdin.readline

S = str(input())
N = len(S)-1

N1 = (N-1)/2
N2 = (N+3)/2

s1 = S[:N]
s2 = S[:N1]
s3 = S[N2-1:N]


### FIXED CODE ###

import sys
input = sys.stdin.readline

S = str(input())
N = len(S)-1

N1 = int((N-1)/2)
N2 = int((N+3)/2)

s1 = S[:N]
s2 = S[:N1]
s3 = S[N2-1:N]

flag = True
for ss in [s1, s2, s3]:
    ss_l = len(ss)
    for i in range(ss_l):
        if ss[i] != ss[ss_l-i-1]:
            flag = False
            break
    if not flag:
        break

if flag:
    print('Yes')
else:
    print('No')
N = int(input())
A = list(map(int, input().split()))

x = []
for i in range(A):
    x.append(1/A[i])
    bunbo = sum(x)
print(1 / bunbo)
    

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))

x = []
for i in range(len(A)):
    x.append(1/A[i])
    bunbo = sum(x)
print(1 / bunbo)