Harryxun/stf_run huggingface dataset:
import sys
def main():
    tmp = sys.stdin.readline()
    while tmp:
        tmp = sys.stdin.readline().split("")
        if a > b:
            c = a
            d = b
        else:
            c = b
            d = a

        

        tmp = sys.stdin.readline()
        break

        
if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys

#最大公約数
def gcd(x, y):
    s = x / y
    r = x % y
    if r == 0:
        return y
    else:
        return gcd(y, r)

#最小公倍数
def lcm(x, y):
    return x*y/gcd(x, y)

def main():
    #print ("a")
    for line in iter(sys.stdin.readline, ""):
        #print (line)
        #tmp = sys.stdin.readline().split(" ")
        #print ("b")
        tmp = line.split(" ")
    
        a = int(tmp[0])
        b = int(tmp[1])
        #print ("a="+str(a))
        #print ("b="+str(b))
        #b = sys.stdin.readline()
        #print ("d")
        if a > b:
            c = a
            d = b
        else:
            c = b
            d = a

        print (str(gcd(c, d)) + " " + str(int(lcm(c,d))))

        #tmp = sys.stdin.readline()
        #if len(tmp) == 1:
        #    break
        #else:
        #    tmp = tmp.split(" ")

    #print ("exit")
     
if __name__ == "__main__":
    main()
n = input()
first = n // 100
second = (n % 100) // 10
third = (n % 10)

if (first == 7 || second == 7 || third == 7):
  print('YES')
else:
  print('No')

### FIXED CODE ###

n = int(input())
first = n // 100
second = (n % 100) // 10
third = (n % 10)

if (first == 7 or second == 7 or third == 7):
  print('Yes')
else:
  print('No')
N = int(input())
A = list(map(int,input().split()))

import math

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

b = 0

for i in A:
    b += lcm_list(A)/i
print(int(b)%(10**9+7))

### FIXED CODE ###

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

import fractions

##def lcm_base(x, y):
##    return (x * y) // fractions.gcd(x, y)

##def lcm_list(numbers):
##    return reduce(lcm_base, numbers, 1)

ans = A[0]
for i in range(1, N):
    ans = ans * A[i] // fractions.gcd(ans, A[i])

b = 0

for i in A:
##    b += lcm_list(A)/i
    b += ans//i
print(int(b)%(10**9+7))
o=list(input())
e=list(input())
n=max(len(o),len(e))
for i in range(n):
  print(o[i]+e[i],end="")

### FIXED CODE ###

o=list(input())
e=list(input())+[""]
for x,y in zip(o,e):print(x+y,end="")
from math import sqrt

x1, y1, x2, y2 = map(int, input().split())
print(sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))

### FIXED CODE ###

from math import sqrt

x1, y1, x2, y2 = map(float, input().split())
print(sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))
h, w = map(int, input().split())
s = [0] * w
for _ in range(h):
    s[_] = [c for c in input()]

# print(s)
# print(s[1][1])

ok = True
for hi in range(h):
    for wi in range(w):
        if s[hi][wi] == '#':
            drawable = False
            # check
            if hi >= 1:
                drawable = (s[hi-1][wi] == '#') | drawable
            
            if hi <= h-2:
                drawable = (s[hi+1][wi] == '#') | drawable
            
            if wi >= 1:
                drawable = (s[hi][wi-1] == '#') | drawable
            
            if wi <= w-2:
                drawable = (s[hi][wi+1] == '#') | drawable

            if not drawable:
                ok = False

print("Yes" if ok else "No")


### FIXED CODE ###

h, w = map(int, input().split())
s = [0] * h
for _ in range(h):
    s[_] = input()

# print(s)
# print(s[1][1])

ok = True
for hi in range(h):
    for wi in range(w):
        if s[hi][wi] == '#':
            drawable = False
            # check
            if hi >= 1:
                drawable = (s[hi-1][wi] == '#') | drawable
            
            if hi <= h-2:
                drawable = (s[hi+1][wi] == '#') | drawable
            
            if wi >= 1:
                drawable = (s[hi][wi-1] == '#') | drawable
            
            if wi <= w-2:
                drawable = (s[hi][wi+1] == '#') | drawable

            # if hi >= 1:
            #     if s[hi-1][wi] == 

            if not drawable:
                ok = False

print("Yes" if ok else "No")
n,x,m=map(int,input().split())
l=[0]*m
s=[0]*m
t=p=0
while l[x]<1:
  l[x]=t
  s[x]=s[p]+x
  p=x
  x=pow(p,2,m)
  t+=1
T=t-l[x]
S=s[p]+x-s[x]
if n<t:
  print(s[l.index(n-1)])
else:
  print(S*((n-l[x])//T)+s[l.index(l[x]+(n-l[x])%T-1)])

### FIXED CODE ###

n,x,m=map(int,input().split())
l=[-1]*m
s=[0]*m
t=p=0
while l[x]<0:
  t+=1
  l[x]=t
  s[x]=s[p]+x
  p=x
  x=pow(p,2,m)
T=t+1-l[x]
S=s[p]+x-s[x]
if n<l[x]:
  print(s[l.index(n)])
else:
  print(S*((n-l[x])//T)+s[l.index(l[x]+(n-l[x])%T)])
n = int(input())
ans = 1
for i in range(n):
    a = int(input())
    if ans * a > 1e18:
        ans = -1
    else:
        ans *= a

print(ans)

### FIXED CODE ###

n = int(input())
l = map(int, input().split())
ans = 1
for a in l:
    if ans * a > 1e18:
        ans = -1
    elif ans != -1 or a == 0:
        ans *= a

print(ans)
a, b = map(int, input().split())
print(a*b)

### FIXED CODE ###

a, b =  input().split()
a = int(a)
b = int(b.replace('.', ''))
print(int(a * b // 100))
N,X = map(int,input().split())
D = 0
ans = 1
for i in range(N):
    A = int(input().split())
    if D <=X:
        D+=A
        ans+=1
    else:
        continue
if D >X:
    ans-=1
print(ans)
    
    

### FIXED CODE ###

N,X = map(int,input().split())
D = 0
ans = 1
L = list(x for x in input().split())
for i in range(N):
    
    if D <=X:
        D+=int(L[i])
        ans+=1
    else:
        continue
if D >X:
    ans-=1
print(ans)
n,k= map(int,input().split())
from math import factorial 
for i in range(1,k+1):
  if n-k+1 >= i:
    print(int(factorial(k-1) * factorial(n-k+1)/factorial(i-1)/factorial(k-i)/factorial(i)/factorial(n-k+1-i))%((10**9)+7))
  else:
    print(0)


### FIXED CODE ###

import math
MOD = 10 ** 9 + 7

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


def f(n):
    return math.factorial(n)


for i in range(K):
    if N - K - i >= 0:
        print(f(N - K + 1) // f(N - K - i) // f(i + 1)
              * (f(K - 1) // f(K - i - 1) // f(i)) % MOD)
    else:
        print(0)
N = int(input())
A = list(map(int, input().split()))
import numpy as np

a = np.array(A)
l = int(((N**2)+1)/2)
b = np.tile((1,-1),(1,l))
c = np.delete(b, 2*l-1, axis=None)
d = c.reshape(N,N)
e = np.triu(d)
f = np.tril(d)
g = np.eye(N)

inv = 0.5*(e-(f-g))

x = 2*(np.dot(inv,a))

ans = list(map(str, list(map(int, list(x)))))
print(" ".join(ans))

### FIXED CODE ###

import numpy as np
N = int(input())
A = list(map(int, input().split()))
a = np.array(A)
# l = int(((N*N)+1)/2)
b = []
for i in range(N):
    if i%2==0:
        b.append(1)
    else:
        b.append(-1)
c = np.dot(np.array(b),a)
x = [c]
for j in range(1,N):
    x_j = 2*a[j-1] - x[j-1]
    x.append(x_j)
ans = list(map(str, list(map(int, list(x)))))
print(" ".join(ans))
import sys
input = sys.stdin.readline

def dfs(v, p=-1):
    for u in to[v]:
        if u == p: continue
        ans[u] += ans[v]
        dfs(u, v)
    
def main():
    for i in range(N-1):
        a, b = map(int, input().split())
        a -= 1
        b -= 1
        to[a].append(b)
        to[b].append(a)
        
    for i in range(Q):
        p, x = map(int, input().split())
        ans[p-1] += x
        
    dfs(0)
    
    for a in ans: print(a)

if __name__ == '__main__':
    N, Q = map(int, input().split())
    to = [[] for i in range(200005)]
    ans = [0] * N
    
    main()

### FIXED CODE ###

from collections import deque

def main():
  N, Q = map(int, input().split())
  visited = [False] * (N+1)
  graph = {i:deque() for i in range(N+1)}

  for i in range(N-1):
    a, b = map(int, input().split())
    graph[a].append(b)
    graph[b].append(a)

  visited[1] = True

  c = [0] * (N+1)
  for i in range(Q):
    p, x = map(int, input().split())
    c[p] += x
    
  q = [1]
  while q:
    per = q.pop()
    for child in graph[per]:
      if not visited[child]:
        visited[child] = True
        c[child] += c[per]
        q.append(child)

  for i in range(1, N+1):
    print(c[i], '', end='')

if __name__ == '__main__':
  main()
n,k,q=map(int,input().split())
a=[]
while True:
  try:
    a.append(int(input()))
  except:
    break;
print(a)
t=[]*n
for i in a:
  t[i-1]+=1
for i in t:
  if i>=q-k+1:
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

n,k,q=map(int,input().split())
a=[]
while True:
  try:
    a.append(int(input()))
  except:
    break;
t=[0]*n
for i in a:
  t[i-1]+=1
for i in t:
  if i >= q - k + 1:
    print("Yes")
  else:
    print("No")
x1 = list(map(int,input().rstrip().split(" ")))
x2 = list(map(int,input().rstrip().split(" ")))

def makey(x1,x2):
  total = 0
  for i in range(x1[0]):
    total += x2[i]
    if total > x1[1]:
      return i
    return x1[0]

y = makey(x1,x2)
print(y+1)


### FIXED CODE ###

y = list(map(int,input().rstrip().split(" ")))
X,A = y[0],y[1]
if X < A:
  print(0)
else:
  print(10)
import math

s = list(input())
q = int(input())

mae = []
usi = []
k = 0
m = 0
for i in range(q):
    a = input().split()
    if(a[0] == '1'):
        k += 1
    if(a[0] == '2'):
        if(k %2 == 0):
            if(a[1] == '1'):
                mae.appendleft(a[2])
            else:
                usi.append(a[2])
        else:
            if(a[1] == '1'):
                usi.append(a[2])
            else:
                mae.appendleft(a[2])

if(k % 2 == 1):
    mae = mae[::-1]
    usi = usi[::-1]
    s = s[::-1]
    s = ''.join(usi+s+mae)
else:
    s = ''.join(mae+s+usi)
print(s)




### FIXED CODE ###

from collections import deque

s = list(input())
q = int(input())

mae = deque()
usi = deque()
k = 0
m = 0
for i in range(q):
    a = input().split()
    if(a[0] == '1'):
        k += 1
    if(a[0] == '2'):
        if(k %2 == 0):
            if(a[1] == '1'):
                mae.appendleft(a[2])
            else:
                usi.append(a[2])
        else:
            if(a[1] == '1'):
                usi.append(a[2])
            else:
                mae.appendleft(a[2])
mae = list(mae)
usi = list(usi)

if(k % 2 == 1):
    mae = mae[::-1]
    usi=usi[::-1]
    s = s[::-1]
    s = ''.join(usi+s+mae)
else:
    s = ''.join(mae+s+usi)
print(s)
S, T = input().split()

if S == T[:len(S)]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S = input()
T = input()

if S == T[:len(S)]:
  print("Yes")
else:
  print("No")
x_list = []
while 1:
	x = input()
	x_list.append(x)
	if x == 0:
		break
for x in x_list:
	if x == 0:
		break
	print "Case " +  str(x_list.index(x)+1) + ": " + str(x)

### FIXED CODE ###

i = 0
while 1:
	x = input()
	if x == 0:
		break
	i += 1
	print "Case %d: %d" % (i,x)
def get_cache(chars, start, end, cache=dict()):
    pair = (start, end)
    block = cache.get(pair)
    if block is not None:
        return block
    else:
        block = chars[start:end]
        cache[pair] = block
        return block


def count_k(chars, previous_start, previous_end, cache=dict()):
    skip = len(chars)
    previous_len = previous_end - previous_start
    if previous_end + previous_len < len(chars):
        previous = get_cache(chars, previous_start, previous_end)
        suspicious_end = previous_end + previous_len
        suspicious = get_cache(chars, previous_end, previous_end + previous_len)
        if previous == suspicious:
            skip = suspicious_end

    max_k = 1
    for n in range(previous_end + 1, len(chars)):
        if n == skip:
            continue
        pair = (previous_end, n)
        if pair in cache:
            k = cache[pair]
        else:
            k = count_k(chars, previous_end, n) + 1
            cache[pair] = k
        if k == 1:
            continue
        if max_k >= k:
            break
        else:
            max_k = k
    return max_k


s = input()
print(count_k(list(s), 0, 0))


### FIXED CODE ###

s = input()
maximum = [(0, [()])]

s = tuple(s)
for i in range(1, len(s) + 1):
    j = i - 1
    while j >= 0:
        max_count, previous = maximum[j]
        if max_count < 0:
            j -= 1
            continue
        current = s[j:i]
        if any(p != current for p in previous):
            if len(maximum) == i + 1:
                mc, blocks = maximum[i]
                if mc == max_count + 1:
                    blocks.append(current)
                break
            else:
                maximum.append((max_count + 1, [current]))
        j -= 1
    else:
        if len(maximum) != i + 1:
            maximum.append((-1, []))
    assert len(maximum) == i + 1

print(maximum[-1][0])
s = input()
K = int(input())
ls = []
for i in range(1,len(s)+1):
    for j in range(i,len(s)+1):
        tmp = s[i:j]
        if tmp != "":
            ls.append(s[i:j])
print(sorted(list(set(ls)))[K-1])

### FIXED CODE ###

s = input()
K = int(input())
ls = []

for i in range(1,K+1):
    for j in range(len(s)):
        ls.append(s[j:j+i])
print(sorted(set(ls))[K-1])
N, T = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]
dp = [[0] * (T+1) for _ in range(N+1)]
AB.sort(key = lambda x:x[0], reverse=True)
AB[0][0] = 0
for i in range(1,N+1):
    for j in range(1,T+1):
        if j < AB[i-1][0]:
            dp[i][j] = dp[i-1][j]
        else:
            dp[i][j] = max(dp[i-1][j-AB[i-1][0]] + AB[i-1][1], dp[i-1][j])
print(dp[N][T])


### FIXED CODE ###

r = int(input())
print(r**2)
s,w=map(int,input().split())
if n <= m:
  print('unsafe')
else:
  print('safe')

### FIXED CODE ###

s,w=map(int,input().split())
if s <= w:
  print('unsafe')
else:
  print('safe')
a, op, b = input().split()
a, b = map(int())
if op = "+":
  print(a + b)
elif op = "-":
  print(a - b)
else:
  pass

### FIXED CODE ###

a, op, b = input().split()
a = int(a)
b = int(b)
if op == "+":
    print(a + b)
elif op == "-":
    print(a - b)
else:
    pass
n = int(input())
num_list = []

for _ in range(n):
    cmd = (input().split())
    if   cmd[0] == 'insert':
        num_list.insert(0,int(cmd[1]))
    elif cmd[0] == 'delete':
        idx = num_list.index(int(cmd[1]))
        del(num_list[idx])
    elif cmd[0] == 'deleteFirst':
        del(num_list[0])
    elif cmd[0] == 'deleteLast':
        num_list.pop()

ans_list = [str(i) for i in num_list]
print(' '.join(ans_list))


### FIXED CODE ###

from collections import deque
dq = deque()
for _ in [None]*int(input()):
    s = input()
    if s == "deleteFirst":
        dq.popleft()
    elif s == "deleteLast":
        dq.pop()
    else:
        a, b = s.split()
        if a == "insert":
            dq.appendleft(b)
        else:
            if b in dq:
                dq.remove(b)
print(" ".join(dq))
# 159 B

n, a, b = map(int, input().split())
s = ""

while len(s) <= n:
    s += a * "b"
    s += b * "r"

s = s[:n]
print(s.count("b"))


### FIXED CODE ###

n, a, b = map(int, input().split())
num = 0

x = n // (a + b)
num += (x * a)

y = n % (a + b)

if y <= a:
    num += y
else:
    num += a

print(num)
N, L = map(int, input().split())
S = [input() for s in range(N)]
S.sort()
output = ""
for i in S:
  output+=i
prunt(output)

### FIXED CODE ###

a,b,c = sorted(map(int, input().split()))
if (a+b+c==17)&(a==b)&(c==7):
  print("YES")
else:
  print("NO")
"""
[a,b]=list(map(float,input().split()))
import math
a=int(a)
b=int(b*100)
ans=a*b
ans=ans/100
ans=math.floor(ans)
print(ans)
"""
import decimal
[a,b]=list(input().split()
a10=decimal.Decimal(a)
b10=decimal.Decimal(b)
ans=int(a10*b10)
print(ans)


"""
[a,b]=list(input().split())
a=int(a)
b12=list(b.split('.'))
bkai=int(int(b12[0])*100+int(b12[1]))
ans=a*bkai
ans=ans//100
print(ans)

### FIXED CODE ###

"""
[a,b]=list(map(float,input().split()))
import math
a=int(a)
b=int(b*100)
ans=a*b
ans=ans/100
ans=math.floor(ans)
print(ans)
"""
[a,b]=list(input().split())
a=int(a)
b12=list(b.split('.'))
bkai=int(int(b12[0])*100+int(b12[1]))
ans=a*bkai
ans=ans//100
print(ans)
A=int(input())
B=int(input())
C=int(input())
X=int(input())
count=0

for i in range(A+1):
    for j in range(B+1):
        for k in range(C+1):
            if 500*i+100*j+50*k==X:
                count+=1
            else:
                pass

print(count)

### FIXED CODE ###

X=int(input())
A=int(input())
B=int(input())

X=X-A

while True:
    X=X-B
    if X-B<0:
        break
    else:
        pass
print(X)
n = int(input())
for i in range(11):
  p = 0
  q = 0
  p = n%26
  if n==0 and p==0:
    l2[i]=""
  else:
    l2[i]=l[p]
    if p ==0:
      q = n - 26
    else:
      q = n - p
    n = q//26
print(l2[10]+l2[9]+l2[8]+l2[7]+l2[6]+l2[5]+l2[4]+l2[3]+l2[2]+l2[1]+l2[0])

### FIXED CODE ###

l = ["z","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"]
l2 = [0]*11

n = int(input())
for i in range(11):
  p = 0
  q = 0
  p = n%26
  if n==0 and p==0:
    l2[i]=""
  else:
    l2[i]=l[p]
    if p ==0:
      q = n - 26
    else:
      q = n - p
    n = q//26
print(l2[10]+l2[9]+l2[8]+l2[7]+l2[6]+l2[5]+l2[4]+l2[3]+l2[2]+l2[1]+l2[0])
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
 
def gcd_list(li):
	if len(li) > 2:
		x = gcd(li[-1], li[-2])
		li = li[:-2] + [x]
		return gcd_list(li)
	else:
		return gcd(li[0], li[1])
def main():
    a = int(input())
    lists = list(map(int, input().split()))
    score = []

    bai = gcd_list(lists)

    for i in lists :
        num = bai / i
        score.append(num)

    bunbo = sum(score)

    ans = bai /bunbo
    print(ans)


if __name__ == '__main__' :
    main()

### FIXED CODE ###

import sys

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
 
def gcd_list(li):
	if len(li) > 2:
		x = gcd(li[-1], li[-2])
		li = li[:-2] + [x]
		return gcd_list(li)
	else:
		return gcd(li[0], li[1])


def main():
    a = int(input())
    lists = list(map(int, input().split()))
    score = []

    if len(lists)==1:
        print(lists[0])
        sys.exit()

    bai = gcd_list(lists)

    for i in lists :
        num = bai / i
        score.append(num)

    bunbo = sum(score)

    ans = bai /bunbo
    print(ans)


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

s=0
count=0

while s <= k:
  if a[0] <= b[0]:
    s=s+a[0]
    count=count+1
    del(a[0])
  else:
    s=s+b[0]
    count=count+1
    del(b[0])
    
print(count-1)

### FIXED CODE ###

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

s=0
ac=0
bc=0
max=0

for i in range(n):
  s=s+a[i]
  ac=ac+1
  if s > k:
    s=s-a[i]
    ac=ac-1
    break
for i in range(m):
  s=s+b[i]
  bc=bc+1
  if s > k:
    s=s-b[i]
    bc=bc-1
    break

max=ac+bc

flag=0
while flag==0 and ac!=0:
  ac=ac-1
  s=s-a[ac]
  while s <= k:
    bc=bc+1
    if bc > m:
      flag=1
      break
    s=s+b[bc-1]
  bc=bc-1
  if flag==0:
    s=s-b[bc]
  
  if max < ac+bc:
    max=ac+bc
    
print(max)
num = int(input())
str_list = input.split(" ")

num_dict = {}
for s in str_list:
  if s in num_dict:
    print("NO")
    return
  else:
    num_dict[s] = 1
print("YES")

### FIXED CODE ###

num = input()
str_list = input().split(" ")
 
yes = True
num_dict = {}
for s in str_list:
	if s in num_dict:
		yes = False
		break
	else:
		num_dict[s] = 1
if yes:
	print("YES")
else:
	print("NO")
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
k=0
for i in range(n):
  if i%2==0:
    k+=a[i]
b[0]=sum(a)-k*2
for i in range(1,n):
  b[i]=2*a[i-1]-b[i-1]
  
print(' '.join(b))

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b=[0]*n
k=0
for i in range(n):
  if i%2==1:
    k+=a[i]
b[0]=sum(a)-k*2
for i in range(1,n):
  b[i]=2*a[i-1]-b[i-1]
yu=map(str,b) 
print(' '.join(yu))
s = input()
x,y = (int(i) for i in input().split())
f,l,dx,now,num = s.count("T"),len(s),True,0,0
ax = [[0 for i in range((l-f)*2+1)] for i in range((f+2)//2+1)]
ay = [[0 for i in range((l-f)*2+1)] for i in range(f//2+1)]
ax[0][l-f],ay[0][l-f],s = 1,1,s+"T"
for i in range(l+1):
	if s[i]=="F": num+=1
	elif dx:
		for j in range((l-f)*2+1):
			if ax[now][j]==1:
				if j-num>=0: ax[now+1][j-num]=1
				if j+num<(l-f)*2+1: ax[now+1][j+num]=1
		dx,num = False,0
	else:
		for j in range((l-f)*2+1):
			if ay[now][j]==1:
				if j-num>=0: ay[now+1][j-num]=1
				if j+num<(l-f)*2+1: ay[now+1][j+num]=1
		now,dx,num = now+1,True,0
if ax[-1][l-f+x]==1 and ay[-1][l-f+y]==1: print("Yes")
else: print("No")

### FIXED CODE ###

s = [len(i) for i in input().split("T")]
x,y  = (int(i) for i in input().split())
xl,yl,flag = [],[],False
for i in range(len(s)):
	if i%2==0: xl.append(s[i])
	else: yl.append(s[i])
x,y,xl = abs(x-xl[0]),abs(y),xl[1:]
xs,ys,lenx,leny,xl2,yl2 = sum(xl),sum(yl),len(xl),len(yl),[0],[0]
a,b = [[0 for i in range(xs+1)] for i in range(lenx+1)],[[0 for i in range(ys+1)] for i in range(leny+1)]
a[0][0],b[0][0] = 1,1
if xs>=x and (xs-x)%2==0 and ys>=y and (ys-y)%2==0: x2,y2,flag = (xs-x)//2,(ys-y)//2,True
else: print("No")
if flag:
	for i in range(lenx):
		for j in range(x2+1):
			if xl[i]<=j: a[i+1][j] = a[i][j-xl[i]] | a[i][j]
			else: a[i+1][j] = a[i][j]
	for i in range(leny):
		for j in range(y2+1):
			if yl[i]<=j: b[i+1][j] = b[i][j-yl[i]] | b[i][j]
			else: b[i+1][j] = b[i][j]
	if a[-1][x2] and b[-1][y2]: print("Yes")
	else: print("No")
a,b = map(int,input().split())

if abs(a-b)%2 != 0
    print(abs(a-b)/2)
else:
    print('IMPOSSIBLE')

### FIXED CODE ###

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

if (a+b) % 2 == 0:
    print((a+b)//2)
else:
    print('IMPOSSIBLE')
N = int(input())
S, T = input().split()

res = ''

for i in range(n):
  res = res + str(S[i]) + str(T[i])
  
print(res)

### FIXED CODE ###

n = int(input())
s, t = input().split()
 
res = ''
 
for i in range(n):
  res = res + str(s[i]) + str(t[i])
  
print(res)
a=int(input("整数aを入力してください："))
b=int(input("整数bを入力してください："))
 
if (a*b)%2==0:
  print("Even")
else:
  print("Odd")

### FIXED CODE ###

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

if a*b%2==0:
    print("Even")
else:
    print("Odd")
def kaibun(mojiretu):
    leg = len(mojiretu)
    mid = (leg-1) /2
    for i in range(mid):
        if mojiretu[i] != mojiretu[(mid+1)+i]:
            return False
    return True

input_line = input()
if not kaibun(input_line):
    print('No')
    quit()

mid = (leg-1) /2
if not kaibun(input_line[0:mid]):
    print('No')
    quit()

if not kaibun(input_line[mid+1:]):
    print('No')
    quit()

### FIXED CODE ###

def fin():
    print('No')
    quit()

input_line = input()
if not input_line == input_line[::-1]:
    fin()

N = len(input_line)
new_str = input_line[0:(N-1)//2]
if not new_str == new_str[::-1]:
    fin()

print('Yes')
import sys
input = sys.stdin.readline

n, m = list(map(int, input().rstrip().split()))
ans = [""] * m
arr = []
cnt = 1
for i in range(m):
    p, y = map(int, input().split())
    arr += [(p, y, i)]
arr = sorted(arr)

ans[arr[0][2]] = "{:06}{:06}".format(arr[0][0], cnt)
for i in range(1, m):
    if arr[i - 1][0] == arr[i][0]:
        cnt += 1
    else:
        cnt = 1
    ans[arr[i][2]] = "{:06}{:06}".format(arr[i][0], cnt)

for i in asn:
    print(i)

### FIXED CODE ###

import sys
input = sys.stdin.readline

n, m = list(map(int, input().rstrip().split()))
ans = [""] * m
arr = []
cnt = 1
for i in range(m):
    p, y = map(int, input().split())
    arr += [(p, y, i)]
arr = sorted(arr)

ans[arr[0][2]] = "{:06}{:06}".format(arr[0][0], cnt)
for i in range(1, m):
    if arr[i - 1][0] == arr[i][0]:
        cnt += 1
    else:
        cnt = 1
    ans[arr[i][2]] = "{:06}{:06}".format(arr[i][0], cnt)

for i in ans:
    print(i)
S = input()
K = int(input())
ret = "1"
for i in K:
    if len(S) <= K:
        break
    if i != "1":
        ret = i
        break
print(ret)


### FIXED CODE ###

S = input()
K = int(input())
ret = "1"
for i in range(K):
    if len(S) < i-1:
        break
    if S[i] != "1":
        ret = S[i]
        break
print(ret)