Harryxun/stf_run huggingface dataset:
n = int(input())
map_list = []
for _ in range(n):
    map_list.append(input().split())

found_data = False
for i in range(101):
    for j in range(101):
        c = 0
        x = map_list[0][0]
        y = map_list[0][1]
        h = map_list[0][2]
        h = max(int(h), 0)
        val = abs(i - int(x)) + abs(j - int(y)) + int(h)
        #print('base:',i, j, val)
        
        for data in map_list[1:]:
            x, y, h = data
            h = max(int(h), 0)
            #print('check:',i, j, val, abs(i - int(x)) + abs(j - int(y) + int(h)))
            if int(h) != max(H - abs(i - int(x)) - abs(j - int(y)), 0):
                break
            c += 1
        if c >= n - 1:
            found_data = True
            break
    if found_data:
        break

h = abs(i - int(x)) + abs(j - int(y)) + int(h)
print(i, j, h)


### FIXED CODE ###

n = int(input())
map_list = []
for _ in range(n):
    map_list.append(input().split())

def function():
    for i in range(101):
        if int(map_list[i][2]) > 0:
            x = int(map_list[i][0])
            y = int(map_list[i][1])
            h = int(map_list[i][2])
            break
        else:
            continue

    for i in range(101):
        for j in range(101):
            cont_check = True
            H = abs(x - i) + abs(y - j) + h
            
            for data in map_list:
                xx, yy, hh = map(int, data)
                if hh != max(H - abs(xx - i) - abs(yy - j), 0):
                    cont_check = False
                    break
            if cont_check:
                return i, j, H

i, j, H = function()
print(i, j, H)
a,b = map( int , raw_input().split() )
print a*b , 2*(a+b)

### FIXED CODE ###

a, b = map(int, raw_input(). split())
print a * b, 2 * (a + b)
N, M = map(int, input().split())
if M == 0:
  if N == 1:
    print(0)
  else:
    m = 10 ** (N - 1)
    print(m)
else:
  dic = {}
  t = ''
  flg = True
  flg2 = True
  for _ in range(M):
    s, c = map(int, input().split())
    if s not in dic:
      dic[s] = c
    else:
      flg = False
      break
  if flg:
    if N == 1:
      if dic[1] == 0:
        print(0)
      else:
        print(dic[1])
    else:
      if 1 in dic:
        if dic[1] == 0:
          flg2 = False
        else:
          t += str(dic[1])
      for j in range(2, N + 1):
        if j in dic:
          t += str(dic[j])
        else:
          t += '0'
    if flg2:
      print(int(t))
    else:
      print(-1)
  else:
    print(-1)



### FIXED CODE ###

N, M = map(int, input().split())
if M == 0:
  if N == 1:
    print(0)
  else:
    m = 10 ** (N - 1)
    print(m)
else:
  dic = {}
  t = ''
  flg = True
  for _ in range(M):
    s, c = map(int, input().split())
    if s not in dic:
      dic[s] = c
    else:
      if dic[s] != c:
        flg = False
        break
  if N == 1:
    if dic[1] == 0:
      ans = 0
    else:
      ans = dic[1]
  else:
    if 1 in dic:
      if dic[1] == 0:
        flg = False
      else:
        t += str(dic[1])
    else:
      t += '1'
    for j in range(2, N + 1):
      if j in dic:
        t += str(dic[j])
      else:
        t += '0'
    ans = int(t)
  if flg:
    print(ans)
  else:
    print(-1)
N = int(input())
A = map(int, input().split())

r, pow = 1, 10 ** 18
for num in A:
  r *= num
  if r == 0:
    break
print(-1 if r > pow else r)


### FIXED CODE ###

a, b = map(int, input().split())
print(a * b)
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

K = int(input())

sum1 = 0
sum2 = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            if i =< j =< k:
                sum1 += gcd(i, j, k)
            if i == j == k:
                sum2 += gcd(i, j, k)

print(sum1 * 3 - sum2 * 2)


### FIXED CODE ###

import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

K = int(input())

sum1 = 0
sum2 = 0
sum3 = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            if i <= j <= k:
                sum1 += gcd(i, j, k)
                if i == j == k:
                    sum2 += gcd(i, j, k)
                if (i == j != k) or (j == k != i) or (k == i != j):
                    sum3 += gcd(i, j, k)

print(sum1 * 6 - sum2 * 5 - sum3 * 3)
import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix


n,m = map(int,input().split())

a_L,b_L = [],[]

for i in range(n):
    a,b = map(int,input().split())
    a_L.append(a)
    b_L.append(b)


### FIXED CODE ###


n,m = map(int,input().split())

s_L = []

for i in range(m):
    L = list(map(int,input().split()))
    a = min(L)
    b = max(L)

    if a == 1:
        s_L.append(b)
    elif b == n:
        s_L.append(a)

#print(s_L)
if len(set(s_L)) == len(s_L):
    print("IMPOSSIBLE")
else:
    print("POSSIBLE")
h,w=map(int,input().split())
a=[]
for i in range(h):
    li=str(input())
    if len(set(li))!=1:
        a.append(li)
cnt=[]
b=[]
for j in range(w):
    for k in range(len(a)):
        b.append(a[k][j])
    if len(set(b))==2 or b[0]=="#":
      cnt.append(j)
    b=[]            
ans=""
for m in range(len(a)):
  for l in cnt:
    ans+=a[m][l]
  print(ans)
  ans=""

### FIXED CODE ###

h,w=map(int,input().split())
a=[]
for i in range(h):
    li=str(input())
    if len(set(li))!=1:
        a.append(li)
    elif len(set(li))==1 and li[0]=="#":
        a.append(li)
      
cnt=[]
b=[]
for j in range(w):
    for k in range(len(a)):
        b.append(a[k][j])
    if len(set(b))==2: 
      cnt.append(j)
    elif len(set(b))==1:
      if b[0]=="#":
        cnt.append(j)       
    b=[]            
ans=""
for m in range(len(a)):
  for l in cnt:
    ans+=a[m][l]
  print(ans)
  ans=""
from collections import deque
n, k = map(int,input().split())
a = list(map(int,input().split()))
mod = 10 ** 9 + 7

p = []
m = []
for i in a:
    if i >= 0:p.append(i)
    elif i < 0:m.append(i)

p.sort(reverse=True)
m.sort()
res = 1

if len(p) == 0 and k % 2 == 1:
    for i in range(k):
        res = (res * m[-(i + 1)]) %mod
    print(res)

else:
    p_ind = 0
    m_ind = 0
    while k:
        if k == 1:
            res = (res * p[p_ind]) %mod
            k -= 1
            break
        temp = p[p_ind] * p[p_ind + 1] if p_ind + 1 < len(p) else 0
        temp1 = m[m_ind] * m[m_ind + 1] if m_ind + 1 < len(m) else -1
        if temp > temp1:
            res = (res * p[p_ind]) %mod
            p_ind += 1
            k -= 1
        else:
            res = (res * temp1) %mod
            m_ind += 2
            k -= 2
    print(res)

### FIXED CODE ###

from collections import deque
n, k = map(int,input().split())
a = list(map(int,input().split()))
mod = 10 ** 9 + 7

p = []
m = []
for i in a:
    if i >= 0:p.append(i)
    elif i < 0:m.append(i)

p.sort(reverse=True)
m.sort()
res = 1
if n == k:
    for i in a:
        res = (res * i) %mod
    print(res)
    exit()
    
if len(p) == 0 and k % 2 == 1:
    for i in range(k):
        res = (res * m[-(i + 1)]) %mod
    print(res)

else:
    p_ind = 0
    m_ind = 0
    while k:
        if k == 1:
            res = (res * p[p_ind]) % mod
            break
        
        temp = p[p_ind] * p[p_ind + 1] if p_ind + 1 < len(p) else 0
        temp1 = m[m_ind] * m[m_ind + 1] if m_ind + 1 < len(m) else 0
        if temp > temp1:
            res = (res * p[p_ind]) %mod
            p_ind += 1
            k -= 1
        else:
            res = (res * temp1) %mod
            m_ind += 2
            k -= 2
    print(res)
from itertools import product

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

cost = 10 ** 10
for cand in product((0, 1), repeat=n):
  tmp = 0
  scores = [0] * n
  for bought, ca in zip(cand, CA):
    if not bought:
      continue
    for i in range(1, m + 1):
      scores[i - 1] += ca[i]
    tmp +=  ca[0]
  if min(scores) >= x and tmp < cost:
    cost = tmp
print(cost)

### FIXED CODE ###

from itertools import product

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

cost = -1
for cand in product((0, 1), repeat=n):
  tmp = 0
  scores = [0] * m
  for bought, ca in zip(cand, CA):
    if not bought:
      continue
    for i in range(1, m + 1):
      scores[i - 1] += ca[i]
    tmp +=  ca[0]
  if min(scores) >= x and (cost == -1 or tmp < cost):
    cost = tmp
print(cost)
n=int(input())
a=[]
for i in range(n):
    s,p=input().split()
    a+=[(s,-int(p),i+1)]
a.sort()
for i in a:
    print(a[2])

### FIXED CODE ###

import sys
import bisect
from collections import defaultdict

ans=0
n=int(input())
a=[]
for i in range(n):
    #s,p=map(int,input().split())
    s,p=input().split()
    a.append((s,-int(p),i+1))
#a=[(1,int(i)) for i in input().split()]
a=sorted(a)

for i in range(n):
    print(a[i][2])
import fraction
from functools import reduce
 
def gcd(*numbers):
    return reduce(fraction.gcd, numbers)
 
n = int(input())
a = list(map(int, input().split()))
print(gcd(*a))

### FIXED CODE ###

import fractions
from functools import reduce
 
def gcd(*numbers):
    return reduce(fractions.gcd, numbers)
 
n = int(input())
a = list(map(int, input().split()))
print(gcd(*a))
import math
[a,b,h,m] = [int(x) for x in input().split(" ")]
short = (h*60+m)/(12*60)*360
long = (m)/(60)*360
theta = (abs(long-short)
inte = math.cos(math.radians(theta ))
print(math.sqrt(a**2+b**2+a*b*abs(inte)))


### FIXED CODE ###

import math
 
[a, b, h, m] = [int(x) for x in input().split(" ")]
short = ((h) * 60 + m) / (12 * 60) * 360
long = (m) / (60) * 360
theta = abs(long - short)
inte = math.cos(math.radians(theta))
print(math.sqrt(a ** 2 + b ** 2- 2*a * b * inte))
from sys import stdin

readline = stdin.readline

def main():
    _, *A = map(int, open(0).read().split())
 
    B = map(abs, A)
    C = [a for a in A if a < 0]
    print(sum(B) - min(B)*2*(len(C)%2))
 
 
if __name__ == "__main__":
    main()

### FIXED CODE ###

from sys import stdin

readline = stdin.readline

_, *aa = map(int, open(0).read().split())
r = 0
mi = 1000000000
m = 0
for a in aa:
    if a < 0:
        m += 1
    b = abs(a)
    r += b
    mi = min(b, mi)
print(r - mi * 2 * (m % 2))
N , i = map(int, input())

print(N - i + 1)

### FIXED CODE ###

N , i = map(int, input().split())

print(N - i + 1)
N = int(input())
H = list(map(int, input().split()))

if N == 1:
  ans = 0
else:
  temp = 0
  for n in range(N-1):
    l, r = H[n], H[n+1]
    if r > l:
      temp = 0
    else:
      temp += 1
    ans = max(ans, temp)
    
print(ans)
  

### FIXED CODE ###

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

if N == 1:
  ans = 0
else:
  temp = 0
  ans = 0
  for n in range(N-1):
    l, r = H[n], H[n+1]
    if r > l:
      temp = 0
    else:
      temp += 1
    ans = max(ans, temp)
    
print(ans)
N = int(input())

if N % 2 == 0:
  print((N/2)**2)
  
else:
  print((N // 2)((N // 2) + 1))


### FIXED CODE ###

N = int(input())
 
if N % 2 == 0:
  print(int((N/2)**2))
  
else:
  print(int((N // 2)*((N // 2) + 1)))
while True:
	try:
		num = raw_input().split(" ")
		sum = 0
		x = float(num[0]) / float(num[1])
		if x < 1:
			x = x + 1.0
		for var in range(1, int(num[2]) + 1):
			sum += int(str(x * 10**var)[var:var+1])
			
		print sum
	except EOFError:
		break

### FIXED CODE ###

while True:
	try:
		a,b,n = map(int,raw_input().split())
	except EOFError:
		break
	s = 0
	for var in range(0, n):
		a = a % b * 10
		s += a / b
	print s
A, B, C = map(int, input().split())
diff = max(A, B, C) * 3 - sum(A, B, C)
if diff % 2 == 0:
    print(diff // 2)
else:
    print(diff // 2 + 2)


### FIXED CODE ###

A, B, C = map(int, input().split())
diff = max(A, B, C) * 3 - (A + B + C)
if diff % 2 == 0:
    print(diff // 2)
else:
    print(diff // 2 + 2)
N, M = map(int, input().split())
a = [int(input()) for i in range(M)]

#動的計画法問題
dp = [0] * (N+1)
dp[0] = 1
if 1 not in a:
  dp[1] = 1
  else:
    dp[1] = 0

    for i in range(2,N+1):
      if i in a:
        continue
        dp[i] = dp[i-1] + dp[i-2]

        dp[i] %= (10**9+7)

print(dp[N]) 


### FIXED CODE ###

N, M = map(int, input().split())
a = set([int(input()) for _ in range(M)])
INF = 1000000007

dp = [0] * (N + 1)
dp[0] = 1
if 1 not in a:
	dp[1] = 1
else:
	dp[1] = 0
for i in range(2, N + 1):
	if i in a:
		continue
	dp[i] = dp[i - 1] + dp[i - 2]
	dp[i] %= INF

print(dp[N])
import math
num = input().split(" ")
a = int(num[0])-1
b = int(num[1])
c = int(num[2])
d = int(num[3])
x = b - (b//c) -(b//d) +(b//(c*d//math.gcd(c, d))) -(a -(a//c) -(a//d) + a//(c*d//math.gcd(c, d)))
print(x)

### FIXED CODE ###

def gcd(a, b):
    while b!=0:
        a, b = b, a%b
    return a

num = input().split(" ")
a = int(num[0])-1
b = int(num[1])
c = int(num[2])
d = int(num[3])
e = int(c * d / int(gcd(c, d)))
bb = b - (b//c) -(b//d) +(b//e) 
aa = a - (a//c) -(a//d) + (a//e)
print(int(bb-aa))
import sys
import itertools
# import numpy as np
import time
import math

sys.setrecursionlimit(10 ** 7)

from collections import defaultdict

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

x, y =  map(int, readline().split())

b = (2 * x - y) // 3 
if (2 * x - y) % 3  != 0:
    print(0)
    exit()

a = x - 2 * b

MOD = 10 ** 9 + 7
a %= MOD
b %= MOD

MAX = 10 ** 6
fac = [0 for i in range(MAX)]
finv = [0 for i in range(MAX)]
inv = [0 for i in range(MAX)]

def comInit(mod):
    fac[0], fac[1] = 1, 1
    finv[0], finv[1] = 1, 1
    inv[1] = 1
    for i in range(2, MAX):
        fac[i] = fac[i - 1] * i % mod
        inv[i] = mod - inv[mod % i] * (mod // i) % mod
        finv[i] = finv[i - 1] * inv[i] % mod

def com(n, r, mod):
    if n < r:
        return 0
    if n < 0 or r < 0:
        return 0
    return fac[n] * (finv[r] * finv[n - r] % mod) % mod
    
comInit(MOD)

print(com(a + b, b, MOD))

### FIXED CODE ###

import sys
import itertools
# import numpy as np
import time
import math

sys.setrecursionlimit(10 ** 7)

from collections import defaultdict

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

x, y =  map(int, readline().split())

if x < y:
    x, y = y, x

b = (2 * x - y) // 3 
if (2 * x - y) % 3  != 0:
    print(0)
    exit()

a = x - 2 * b
if a < 0:
    print(0)
    exit()

MOD = 10 ** 9 + 7
a %= MOD
b %= MOD

MAX = 10 ** 6 * 2 + 2
fac = [0 for i in range(MAX)]
finv = [0 for i in range(MAX)]
inv = [0 for i in range(MAX)]

def comInit(mod):
    fac[0], fac[1] = 1, 1
    finv[0], finv[1] = 1, 1
    inv[1] = 1
    for i in range(2, MAX):
        fac[i] = fac[i - 1] * i % mod
        inv[i] = mod - inv[mod % i] * (mod // i) % mod
        finv[i] = finv[i - 1] * inv[i] % mod

def com(n, r, mod):
    if n < r:
        return 0
    if n < 0 or r < 0:
        return 0
    return fac[n] * (finv[r] * finv[n - r] % mod) % mod
    
comInit(MOD)
print(com(a + b, b, MOD))
from sys import stdin, stdout
from math import gcd
 
ii = lambda: int(stdin.readline())
mi = lambda: map(int, stdin.readline().strip().split())
li = lambda: list(mi())

mod = int(1e9) + 7

N = ii()
A = li()
lcm = A[0]
for i in range(1, len(A)):
	lcm = (lcm // gcd(lcm, A[i])) * A[i]

ans = 0
for i in range(0, len(A)):
	ans = (ans + (lcm // A[i])) % mod

print(ans)

### FIXED CODE ###

from sys import stdin, stdout
 
ii = lambda: int(stdin.readline())
mi = lambda: map(int, stdin.readline().strip().split())
li = lambda: list(mi())

mod = int(1e9) + 7

def GCD(x, y): 
   while(y): 
       x, y = y, x % y 
   return x 

N = ii()
A = li()
lcm = A[0]
for i in range(1, len(A)):
	lcm = (lcm // GCD(lcm, A[i])) * A[i]

ans = 0
for i in range(0, len(A)):
	ans = (ans + (lcm // A[i]))

ans %= mod

print(ans)
A = int(input())
B = int(input())

OnlyA = A+(A-1)
 
OnlyB = B+(B-1)
 
AaddB = A + B
 
print(max([OnlyA,OnlyB,AaddB]))

### FIXED CODE ###

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

OnlyA = A+(A-1)

OnlyB = B+(B-1)

AaddB = A + B

print(max([OnlyA,OnlyB,AaddB]))
import math
n,m=[int(i) for i in input().split()]
a=[]
b=[]
for i in range(n):
  a0,b0=[int(i) for i in input().split()]
  a.append(a0)
  b.append(b0)
a.sort(reverse=True)
b.sort(reverse=True)
x=0
while m>0:
  if b[0]>a[0]:
    m-=b[0]
    del b[0] 
    x+=1
  else:
    x+=math.ceil(m/a[0])
    break
    
  
print(x)

### FIXED CODE ###

import math
n,m=[int(i) for i in input().split()]
a=[]
b=[]
for i in range(n):
  a0,b0=[int(i) for i in input().split()]
  a.append(a0)
  b.append(b0)
a.sort(reverse=True)
b.sort(reverse=True)
x=0
while m>0:
  if b==[]:
    x+=math.ceil(m/a[0])
    break
  else:
    if b[0]>a[0]:
      m-=b[0]
      del b[0] 
      x+=1
    else:
      x+=math.ceil(m/a[0])
      break
    
print(x)
a = int(input()) #ch
b = int(input())  #ch
h = int(input())  #hour
m = int(input())  #minits
import math

h_len = h * 30
m_len = m * 6

angle = h_len - m_len
if angle < 0:
    angle = angle * -1

if angle > 180:
    angle = 360 - angle

cos = math.cos(math.radians(angle))
# cos = math.cos(angle)
ans = a * a + b * b - 2 * a * b * cos
print(math.sqrt(ans))

### FIXED CODE ###

import math

a, b, h, m = map(int, input().split())
h=h*60+m

ang=abs(h*0.5-m*6)
if ang > 180:
  ang = 360-ang
if ang==180:
  print(a+b)
elif(ang==0):
  print(abs(b-a))
else:
  ans=(a**2)+(b**2)-(2*a*b*math.cos(math.radians(ang)))
  print(math.sqrt(ans))
def gcd(a, b):
    while b: a, b = b, a % b
    return abs(a)
N, X, D = map(int, input().split())
g = gcd(X, D)
X //= g
D //= g
if D < 0:
    X, D = -X, -D

if D == 0:
    print(N+1 if X else 1)
    exit()
E = {}
for i in range(N+1):
    k = i % D
    l, r = i * (2*X+(i-1)*D) // 2, i * (2*X+(2*N-i-1)*D) // 2
    c = (r - l) // D + 1 if D else 1
    if k not in E:
        E[k] = (l, r, c)
    else:
        ll, rr, cc = E[k]
        if r < ll:
            E[k] = (l, rr, cc + c)
        elif l > rr:
            E[k] = (ll, r, cc + c)
        elif l < ll:
            E[k] = (l, rr, cc + ((ll - l) // D if D else 1))
        elif r > rr:
            E[k] = (ll, r, cc + ((r - rr) // D if D else 1))

ans = 0
for e in E:
    l, r, c = E[e]
    ans += c

print(ans)


### FIXED CODE ###

def gcd(a, b):
    while b: a, b = b, a % b
    return abs(a)
N, X, D = map(int, input().split())
if D == 0:
    print(N+1 if X else 1)
    exit()
g = gcd(X, D)
X //= g
D //= g
if D < 0:
    X, D = -X, -D

E = {}
for i in range(N+1):
    k = i % D
    l, r = i * (2*X+(i-1)*D) // 2, i * (2*X+(2*N-i-1)*D) // 2
    c = (r - l) // D + 1 if D else 1
    if k not in E:
        E[k] = (l, r, c)
    else:
        ll, rr, cc = E[k]
        if r < ll:
            E[k] = (l, rr, cc + c)
        elif l > rr:
            E[k] = (ll, r, cc + c)
        elif l < ll:
            E[k] = (l, rr, cc + ((ll - l) // D if D else 1))
        elif r > rr:
            E[k] = (ll, r, cc + ((r - rr) // D if D else 1))

ans = 0
for e in E:
    l, r, c = E[e]
    ans += c

print(ans)
import fractions
n = int(input())
a = list(map(int, input().split()))
ans = a[0]
for i in range(1, n):
    ans = ans * a[i] // fractions.gcd(ans, a[i])
b = []
for i in range(n):
    an = ans / a[i]
    b.append(int(an))
m = sum(b) % 10**9+7
print(m % (10**9  + 7))

### FIXED CODE ###

import fractions
n = int(input())
a = list(map(int, input().split()))
ans = a[0]
for i in range(1, n):
    ans = ans * a[i] // fractions.gcd(ans, a[i])
b = []
b_sum = 0
mod = 10**9+7
for i in range(n):
    b_sum += (ans // a[i])

print(b_sum % mod)
k,x,y = map(int,input().split())
if 1<=x<=y<=1000 and 1<=k<=1000:
    pass



if x%k>>0 :
    if x<= (x/k+1)*k <=y :
        print('OK')
    else:
        print('NG')
else:
    print('OK')

### FIXED CODE ###

k= int(input())
x,y = map(int,input().split())
if 1<=x<=y<=1000 and 1<=k<=1000:
    pass



    if x%k>>0 :
        if x<= (x//k+1)*k <=y :
            print('OK')
        else:
            print('NG')
    else:
        print('OK')

else:
    print('NG')
import fractions as f
while 1:    
    a,b=map(int,input().split())
    print(str(f.gcd(a,b))+' '+str(a*b//f.gcd(a,b)))

### FIXED CODE ###

import sys
for i in sys.stdin:
    a,b=map(int,i.split())
    if a<b:a,b=b,a
    def gcd(x,y):
        while y>0:x,y=y,x%y
        return x
    def lcm(x,y):
         return x*y/gcd(x,y)
    print(gcd(a,b),int(lcm(a,b)))
a, b, c, d, e, k = map(int, input().split())
if (e - a) >= k:
  print(":(")
else:
  print("Yay!")

### FIXED CODE ###

import sys
a, b, c, d, e, k = map(int,sys.stdin.readlines())
if e - a > k:
  print(":(")
else:
  print("Yay!")
r=int(input()

print(2*r*3.141592)

### FIXED CODE ###

r=int(input())

print(2*r*3.141592)
import sys

S = sys.stdin.readline().rstrip()

WS = ["Sunny", "Cloudy", "Rainy"]

i = WS.index(S)
i += 1
if i == 2:
    i = 0

print(WS[i])


### FIXED CODE ###

import sys

S = sys.stdin.readline().rstrip()

WS = ["Sunny", "Cloudy", "Rainy"]

i = WS.index(S)
i += 1
if i == 3:
    i = 0

print(WS[i])
N = int(input())
S,T = input().split

l = []
for i in range(N):
  l.append(S[i])
  l.append(T[i])
  
print("".join(l))

### FIXED CODE ###

N = int(input())
S,T = input().split()

l = []
for i in range(N):
    l.append(S[i])
    l.append(T[i])

print("".join(l))
import sys
input = sys.stdin.readline


def read():
    S = list(input().strip())
    return S,

def solve(S):
    N = len(S)
    count = 0
    l = 0
    r = N-1
    while S[r] != 'W':
        r-=1
    s = list()
    c = 0
    for i in range(r, -1, -1):
        d = r - i
        if S[i] == 'B':
            s.append(d - c)
            c += 1
    return sum(s)

if __name__ == '__main__':
    inputs = read()
    print("%d" % solve(*inputs))


### FIXED CODE ###

import sys
input = sys.stdin.readline


def read():
    S = list(input().strip())
    return S,

def solve(S):
    N = len(S)
    count = 0
    l = 0
    r = N-1
    while r >= 0 and S[r] != 'W':
        r-=1
    s = list()
    c = 0
    for i in range(r, -1, -1):
        d = r - i
        if S[i] == 'B':
            s.append(d - c)
            c += 1
    return sum(s)

if __name__ == '__main__':
    inputs = read()
    print("%d" % solve(*inputs))
A = map(int, input().split())
E=A[0]
B=A[1]
C=A[2]
D=C-(E-B)
print(D)

### FIXED CODE ###

A,B,C = map(int, input().split())
D=C-(A-B)
if D > 0:
    print(D)
else:
    print(0)
import sys
N = int(input())
a = list(map(int, input()))

s = sorted(a, reverse=True)
m0 = s[0]
m1 = s[1]

for aa in a:
  if aa == m0:
    print(m1)
  else:
    print(m0)

### FIXED CODE ###

import sys
N = int(input())
a = []
for line in sys.stdin.readlines():
  a.append(int(line.strip()))

s = sorted(a, reverse=True)
m0 = s[0]
m1 = s[1]

for aa in a:
  if aa == m0:
    print(m1)
  else:
    print(m0)
a,b=int(input())
if a>6 or b>6:
    print(':(')
else:
    print('Yay!')


### FIXED CODE ###

a,b=map(int,input().split())
if a>8 or b>8:
    print(':(')
else:
    print('Yay!')
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

n = ls(input())
nans =[]
for i in range (3):
  if n[i] == "1":
    nans.append("9")
    else:
      nans.append("1")
print("".join(nans))
    


### FIXED CODE ###

#! /usr/bin/env python3
# -*- coding: utf-8 -*-


n = list(input())
nans =[]
for i in range (3):
    if n[i] == "1":
        nans.append("9")
    else:
        nans.append("1")
print("".join(nans))