Harryxun/stf_run huggingface dataset:
s=input()
K=int(input())

def rec(s):
    length=len(s)
    ret=set()
    for depth in range(length):
        string=s[depth]
        ret.add(string)
        for i in range(depth+1,depth+K):
            if i<length:
                string+=s[i]
                ret.add(string)
	return ret
  
ret=rec(s)
print(sorted(ret)[K-1])

### FIXED CODE ###

s=input()
K=int(input())
 
def rec(s):
    length=len(s)
    ret=set()
    for depth in range(length):
        string=s[depth]
        ret.add(string)
        for i in range(depth+1,depth+K):
            if i<length:
                string+=s[i]
                ret.add(string)
    return ret
  
ret=rec(s)
print(sorted(ret)[K-1])
import numpy as np
import sys
sys.setrecursionlimit(10**9)

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

a2 = []
for i in range(n):
    a2.append((a[i], i))
a2.sort(reverse=True)

dp = np.full((n, n, n), -1)


def solve(i2, s, e):
    if dp[i2][s][e] != -1:
        return dp[i2][s][e]

    a, i = a2[i2]

    if i2 == n-1:
        dp[i2][s][e] = a * abs(s-i)
        return dp[i2][s][e]

    dp[i2][s][e] = max(solve(i2+1, s+1, e) + a * abs(s - i),
                       solve(i2+1, s, e-1) + a * abs(e - i))

    return dp[i2][s][e]


print(solve(0, 0, n-1))


### FIXED CODE ###

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

a2 = []
for i in range(n):
    a2.append((a[i], i))
a2.sort(reverse=True)

dp = [[-1] * n for _ in range(n)]
for i2 in range(n-1, -1, -1):
    a, i = a2[i2]

    for s in range(i2+1):
        if i2 == n-1:
            dp[i2][s] = a * abs(s-i)
        else:
            dp[i2][s] = max(dp[i2+1][s+1] + a * abs(s - i),
                            dp[i2+1][s] + a * abs(n-1-i2+s - i))

print(dp[0][0])
def main():
    n, k = map(int, input().split())
    ps = list(map(int, input().split()))
    ps = [(1+p)/2 for p in ps]

    cumulative_sums = [sum(ps[:i]) for i in range(n)]
    ans = max([cumulative_sums[i+k] - cumulative_sums[i] for i in range(n-k)])
    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    n, k = map(int, input().split())
    ps = list(map(int, input().split()))
    e = [(1+p)/2 for p in ps]

    s = [0]
    for i in range(n):
        s.append(s[i]+e[i])

    ans = max([s[i+k] - s[i] for i in range(n-k+1)])
    print(ans)


if __name__ == "__main__":
    main()
[a, b] = [int(_) for _ in input().split()]

print(a * b + ' ' + (a + b) * 2)

### FIXED CODE ###

[a, b] = [int(x) for x in input().split()]
print(a * b ,(a + b) * 2)
a,b,c = input().split()
a = int(a)
c = int(b)

if b == '+':
    print(a + c)
elif b == '-':
    print(a - c)
else:
    print('error')

### FIXED CODE ###

x = input().split()
a = int(x[0])
c = int(x[2])
if x[1] == '+':
    print(a + c)
elif x[1] == '-':
    print(a - c)
else:
    print('error')
def is_possible(x, A):
    current = []
    for a in A:
        if len(current) < a:
            current = current + [1]*(a-len(current))
        else:
            current = current[:a]
            i = a - 1
            current[i] += 1
            while current[i] > x:
                if i == 0:
                    return False
                current[i-1] += 1
                current[i] = 1
                i -= 1
    return True


def main():
    N = int(input())
    A = list(map(int, input().split()))
    left = 1
    right = N
    while left < right:
        center = (left + right) // 2
        if is_possible(center, A):
            right = center
        else:
            left = center + 1
    print(left)


if __name__ == "__main__":
    main()


### FIXED CODE ###

def is_possible(x, A):
    current = {}
    length = 0
    for a in A:
        if a <= length:
            if x == 1:
                return False
            current = {k: current[k] for k in current if k < a}
            i = a - 1
            if i not in current:
                current[i] = 0
            current[i] += 1
            while i in current and current[i] >= x:
                if i == 0:
                    return False
                if (i-1) not in current:
                    current[i-1] = 0
                current[i-1] += 1
                del current[i]
                i -= 1
        length = a

    return True


def main():
    N = int(input())
    A = list(map(int, input().split()))
    left = 1
    right = N
    while left < right:
        center = (left + right) // 2
        if is_possible(center, A):
            right = center
        else:
            left = center + 1
    print(left)


if __name__ == "__main__":
    main()
S = input()
if S == RRR
	print("3")
elif S == SSS
	print("0")
elif S == RRS
	print("2")
elif S == SRR
	print("2")
else 
	print("1")

### FIXED CODE ###

S = input()
if S.count("R") == 3:
	print("3")
elif S.count("R") == 0:
	print("0")
elif S.count("RR") == 1:
  	print("2")
else:
	print("1")
a, b, k = map(int, input().split())
mx = max(a, b) * 0.5
match, ans = 0, 0

for i in range(mx):
    if ((a % (mx - i)) == 0) 
    and ((b % (mx - i)) == 0):
        
        match += 1
        ans = mx - i
        
        if match == k:
            break
print(ans)

### FIXED CODE ###

a, b, k = map(int, input().split())
mx = max(a, b)
match, ans = 0, 0

for i in range(mx):
    if ((a % (mx - i)) == 0) and ((b % (mx - i)) == 0):
        
        match += 1
        ans = mx - i
        
        if match == k:
            break
print(ans)
A, B = map(int, input().split())

import math

print((A * B )//math.gcd(A, B))

### FIXED CODE ###

from fractions import gcd

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

print(str((A * B) // gcd(A, B)))
x,y,z = map(int,input().split())

	if x+y+z >= 22:

		print('bust')

	else:

		print('win')

### FIXED CODE ###

a,b,c=map(int,input().split())
if (a+b+c) >= 22:
    print('bust')
else:
    print('win')
from math import gcd
import functools

def gcd_list(l):
    return functools.reduce(gcd, l)

def solve():
    N,K = map(int, input().split())
    A = list(map(int, input().split()))
    d = gcd_list(A)
    ret = False
    if K > max(A):
        print('IMPOSSIBLE')
        return
    
    for a in A:
        if (a-K)%d == 0:
            ret = True
            break
            
    print('POSSIBLE' if ret else 'IMPOSSIBLE')
    
solve()

### FIXED CODE ###

from fractions import gcd
import functools

def gcd_list(l):
    return functools.reduce(gcd, l)

def solve():
    N,K = map(int, input().split())
    A = list(map(int, input().split()))
    d = gcd_list(A)
    ret = False
    if K > max(A):
        print('IMPOSSIBLE')
        return
    
    for a in A:
        if (a-K)%d == 0:
            ret = True
            break
            
    print('POSSIBLE' if ret else 'IMPOSSIBLE')
    
solve()
N = 5
ARR = [2, 4, 4, 0, 2]

N = 7
ARR = [6, 4, 0, 2, 4, 0, 2]

N = 8
ARR = [7, 5, 1, 1, 7, 3, 5, 3]

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

def calculate(n, arr):
    if n % 2 == 0:
        n = n // 2
        start = 1
        finalResult = 2 ** n
    else:
        n = n // 2 + 1
        start = 0
        finalResult = 2 ** (n - 1)

    result = {}
    for i in range(n):
        index = start + 2 * i
        if index == 0:
            result.__setitem__(0, 1)
        else:
            result.__setitem__(index, 2)

    isOk = True
    for i in range(len(arr)):
        aa = result.get(arr[i])
        aa = aa - 1
        if aa < 0:
            isOk = False
            break
        result.__setitem__(arr[i], aa)


    if sum(result.values()) != 0:
        isOk = False

    if isOk:
        print(finalResult)
    else:
        print(0)

calculate(N, ARR)


### FIXED CODE ###

import math

N = 5
ARR = [2, 4, 4, 0, 2]

N = 7
ARR = [6, 4, 0, 2, 4, 0, 2]
#
# N = 8
# ARR = [7, 5, 1, 1, 7, 3, 5, 3]
#
N = int(input())
ARR = list(map(int, input().split()))


def calculate(n, arr):
    if n % 2 == 0:
        n = n // 2
        start = 1
        finalResult = pow(2, n, 1000000000 + 7)
    else:
        n = n // 2 + 1
        start = 0
        finalResult = pow(2, (n - 1), 1000000000 + 7)

    result = {}
    for i in range(n):
        index = start + 2 * i
        if index == 0:
            result.__setitem__(0, 1)
        else:
            result.__setitem__(index, 2)

    isOk = True
    for i in range(len(arr)):
        if result.get(arr[i]) == None:
            isOk = False
            break

        if result.get(arr[i]) == 0:
            isOk = False
            break

        result.__setitem__(arr[i], result.get(arr[i])-1)

    if isOk == False:
        print(0)
        return

    if sum(result.values()) == 0:
        print(finalResult)
    else:
        print(0)


calculate(N, ARR)
from itertools import zip_longest

def twoAnagrams(s, t):
    s_str = ''.join(sorted(s))
    t_str = ''.join(sorted(t, reverse=True))

    if t_str.startswith(s_str):
        if len(s_str) < len(t_str):
            return True
        # this implies s and t is the same string
        else:
            return False

    for s_chr,t_chr in zip_longest(s_str, t_str):
        if s_chr is None or s_chr < t_chr:
            return True
        elif t_chr is None or t_chr < s_chr:
            return False


s = list(input())
t = list(input())

print('Yes' if twoAnagrams(s,t) else 'No')

### FIXED CODE ###

from itertools import zip_longest

def twoAnagrams(s, t):
    s_str = ''.join(sorted(s))
    t_str = ''.join(sorted(t, reverse=True))

    if t_str.startswith(s_str):
        if len(s_str) < len(t_str):
            return True
        # this implies s and t is the same string
        else:
            return False

    for s_chr,t_chr in zip_longest(s_str, t_str):
        if s_chr is None:
            return True
        elif t_chr is None or t_chr < s_chr:
            return False
        elif s_chr < t_chr:
            return True


s = list(input())
t = list(input())

print('Yes' if twoAnagrams(s,t) else 'No')
def main():
    s = input()
    max_len = 0
    length = 0

    for i in list(s).append(''):
        if i in ['A', 'C', 'G', 'T']:
            length += 1
        else:
            if length > max_len:
                max_len = length
                length = 0


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    s = input()
    max_len = 0
    length = 0

    s = list(s)
    s.append('')

    for i in s:
        if i in ['A', 'C', 'G', 'T']:
            length += 1
        else:
            if length > max_len:
                max_len = length
                length = 0

    print(max_len)


if __name__ == '__main__':
    main()
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import ceil
from heapq import heapify,heappop,heappush
def main():
    n, k, *a = map(int, read().split())
    minusa = [-ae for ae in a]

    heapify(minusa)
    while k > 0:
        maxa = heappop(minusa)
        heappush(minusa, maxa/2)
        k -= 1
        print(minusa)
    r = heappop(minusa)
    r *= -1
    r = ceil(r)
    print(r)

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import ceil
def main():
    n, k, *a = map(int, read().split())
    def isOK(x):
        kaisu = 0
        for ae in a:
            kaisu += ceil(ae / x) - 1
        if kaisu <= k:
            return True
        else:
            return False
    ng = 0
    ok = max(a)
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if isOK(mid):
            ok = mid
        else:
            ng = mid
    print(ok)

if __name__ == '__main__':
    main()
s=list(input())
divide=["dream","erase","eraser","dreamer"]
def dfs(n):
        if n==len(s):
                return True
        for i in divide:
                tmp="".join(s[n:n+len(i)])
                if n+len(i)<=len(s) and tmp==i:
                        if dfs(n+len(i)):
                                return True
        return False
print("YES") if dfs(0) else print("NO")


### FIXED CODE ###

s=input().replace("eraser",",").replace("erase",",").replace("dreamer",",").replace("dream",",").replace(",","")
print("YES" if s=="" else "NO")
from collections import deque

h,w = map(int,input().split())
s = [input() for i in range(h)]
visited = [[-1]*w for i in range(h)]
que = deque()

def bfs(i,j):
  que.append([i,j])
  visited[i][j]=0
  
  while True:
    if not que:
      return "答えなし"
    
    [current_i,current_j] = que.popleft()
    
    if  current_i == h-1 and current_j == w-1:
      return visited[current_i][current_j]
  
    for next in [[-1,0],[+1,0],[0,-1],[0,+1]]:
      next_i = current_i + next[0]
      next_j = current_j + next[1]
      if 0<=next_i<h and 0<=next_j<w:
        if visited[next_i][next_j] == -1 and s[next_i][next_j]==".":
          visited[next_i][next_j] = visited[current_i][current_j]+1
          que.append([next_i,next_j])

count_point=0
for i in range(h):
  for j in range(w):
    if s[i][j] == ".":
      count_point += 1 
  
print(count_point-bfs(0,0)-1)

### FIXED CODE ###

from collections import deque

h,w = map(int,input().split())
s = [input() for i in range(h)]

def bfs(i,j):
  visited = [[-1]*w for i in range(h)]
  que = deque()
  que.append([i,j])
  visited[i][j]=0
  
  while True:
    if not que:
      return -1
    
    [current_i,current_j] = que.popleft()
    
    if  current_i == h-1 and current_j == w-1:
      return visited[current_i][current_j]
  
    for next in [[-1,0],[+1,0],[0,-1],[0,+1]]:
      next_i = current_i + next[0]
      next_j = current_j + next[1]
      if 0<=next_i<h and 0<=next_j<w:
        if visited[next_i][next_j] == -1 and s[next_i][next_j]==".":
          visited[next_i][next_j] = visited[current_i][current_j]+1
          que.append([next_i,next_j])

count_point=0
for i in range(h):
  for j in range(w):
    if s[i][j] == ".":
      count_point += 1 


if bfs(0,0)==-1:
  print(-1)
else:
  print(count_point-bfs(0,0)-1)
# numpy as np???????????????
n, m = map(int, raw_input().split())
 
a = [[0]*m for i in xrange(n)]
 
b = [0]*m
 
for i in xrange(n):
    tmp = map(int, raw_input().split())
    for j in xrange(m):
        a[i][j] = tmp[j]
for i in xrange(m):
    b[i] = input()
for i in xrange(n):
    tmp = 0
    for j in xrange(m):
        tmp += a[i][j] * b[j]
    print tmp

### FIXED CODE ###

n, m = map(int, raw_input().split())
 
a = [[0]*m for i in xrange(n)]
 
b = [0]*m
 
for i in xrange(n):
    tmp = map(int, raw_input().split())
    for j in xrange(m):
        a[i][j] = tmp[j]
for i in xrange(m):
    b[i] = input()
for i in xrange(n):
    tmp = 0
    for j in xrange(m):
        tmp += a[i][j] * b[j]
    print tmp
N,K = [int(x) for x in input().split()]
l = [int(x) for x in input().split()]
l.sort(reversed = True)
print(sum(l[:K]))

### FIXED CODE ###

N,K = [int(x) for x in input().split()]
l = [int(x) for x in input().split()]
l.sort(reverse = True)
print(sum(l[:K]))
n = int(input())
a = [int(x) for x in input().split()]

def gcd(x, y):
    #print('gcd({0},{1})'.format(x,y))
    if (y==0):
        return x
    else:
        return gcd(y, x%y)

def gcd_left(i):
    #print('gcd_left({0})'.format(i))

    if i<0:
        return 0
    else:
        return gcd(gcd_left(i-1), a[i])

def gcd_right(i):
    #print('gcd_left({0})'.format(i))
    
    if i>n-1:
        return 0
    else:
        return gcd(a[i],gcd_right(i+1))

def gcd_excepts(i):
    #print('gcd_excepts({0})'.format(i))
    return gcd( gcd_left(i-1), gcd_right(i+1))

m = [gcd_excepts(i) for i in range(n)]

print(max(m))

### FIXED CODE ###

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

def gcd(x, y):
    #print('gcd({0},{1})'.format(x,y))
    if (y==0):
        return x
    else:
        return gcd(y, x%y)

def gcd_left(i):
    #print('gcd_left({0})'.format(i))

    if i<=-1:
        return 0
    else:
        if l[i]:
            return gcd(gcd_left(i-1), a[i])
        else:
            l[i] = gcd( gcd_left(i-1), gcd_right(i+1))


def gcd_right(i):
    #print('gcd_left({0})'.format(i))
    
    if i>=n:
        return 0
    else:
        return gcd( a[i], gcd_right(i+1))

def gcd_left_update(ls, i):
    #print('gcd_left({0})'.format(i))

    if i<0:
        return 0
    elif i==0:
        return a[i]
    else:        
        return gcd(ls[i-1], a[i])


def gcd_right_update(ls, i):
    #print('gcd_right({0})'.format(i))
    
    if i>=n:
        return 0
    elif i==n-1:
        return a[i]
    else:
        return gcd( a[i], ls[i+1])

def gcd_excepts(i):
    #print('gcd_excepts({0})'.format(i))
    return gcd( gcd_left(i-1), gcd_right(i+1))

def gcd_excepts2(i):
    #print('gcd_excepts2({0})'.format(i))
    left = 0
    right = 0
    if i-1<0:
        left = 0
    else:
        left = l[i-1]
    
    if i+1>=n:
        right = 0
    else:
        right = r[i+1]
        
    return gcd( left, right )

l = [None for i in range(n)]
for i in range(n):
    l[i] = gcd_left_update(l,i)

r = [None for i in range(n)]
for i in reversed(range(n)):
    r [i] = gcd_right_update(r,i)
    
m = [gcd_excepts2(i) for i in range(n)]

print(max(m))
N,M = (int(i) for i in input().split())

SC = []
max_digits = 0
for i in range(M):
  S,C = (int(i) for i in input().split())
  SC.append([S,C])
  max_digits = max(max_digits,S)

ans = -1
for i in range(10**(max_digits-1),10**(max_digits)):
  check_flag = True
  for sc in SC:
    s = sc[0]
    c = sc[1]
    if str(i)[s-1] != str(c):
      check_flag = False
      break
  if check_flag is True:
    ans = i
    break

print(ans)


### FIXED CODE ###

N,M = (int(i) for i in input().split())

SC = []
max_digits = 0
for i in range(M):
  S,C = (int(i) for i in input().split())
  SC.append([S,C])

ans = -1
if M != 0:
  ans = -1
  range_min = 10**(N-1)
  if N == 1:
    range_min = 0
  for i in range(range_min,10**(N)):
    check_flag = True
    for sc in SC:
      s = sc[0]
      c = sc[1]
      if str(i)[s-1] != str(c):
        check_flag = False
        break
    if check_flag is True:
      ans = i
      break
else:
  if N == 1:
    ans = 0
  elif N ==2:
    ans = 10
  elif N == 3:
    ans = 100

print(ans)
# -*- coding: utf-8 -*-

"""
計算式は以下のように示される
C_n = (1/n)*(1+C_(n-1)) + ((n-1)/n)*C_(n-1)  =  C_(n-1)+(1/n)
"""
import math
N = int(input())
X = list(map(int, input().split()))

def calc(n):
    if n==1:
        return 1
    return calc(n-1)+(1.0/n)

result = []
for i in range(1, N):
    result.append(calc(i))
        
print(sum(result)*math.factorial(N-1))

### FIXED CODE ###

# -*- coding: utf-8 -*-

mod = 10**9 +7
N = int(input())
X = list(map(int, input().split()))

factorial=[1]
for i in range(1,N):
    factorial.append(factorial[-1] *i %mod)

ans=0
for i in range(1,N):
    ans = (ans*i + (X[-1]-X[i-1])*factorial[i-1]) %mod

print(ans)
import math

a = list(map(int, input().split()))
print((a[0] * a[1]) // math.gcd(a[0], a[1]))


### FIXED CODE ###

a = list(map(int, input().split()))
b = a[0]
while b % a[1] != 0:
  b += a[0]
print(b)
import sys
def input(): return sys.stdin.readline().rstrip()
from bisect import bisect_left,bisect_right
def main():
    x,n=map(int,input().split())
    PP=list(map(int,input().split()))
    P=[]
    cunt=0
    for xx in range(101):
        if xx in PP:continue
        P.append(xx)
        cunt+=1
    P_left=P[max(bisect_left(P,x)-1,0)]
    P_right=P[bisect_left(P,x)]
    if abs(P_left-x)<=abs(P_right-x):
        print(P_left)
    else:
        print(P_right)

if __name__=='__main__':
    main()

### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    x,n=map(int,input().split())
    P = list(map(int,input().split()))
    n_lis = [0]*102
    for p in P:
        n_lis[p] += 1
    dis = 0
    while 1:
        if n_lis[x-dis] == 0:
            print(x-dis)
            break
        elif n_lis[x+dis] == 0:
            print(x+dis)
            break
        dis += 1

if __name__=='__main__':
    main()
print " ".join(sorted(map(int, raw_input().split()), reverse=True)) 

### FIXED CODE ###

print " ".join([str(x) for x in sorted(map(int, raw_input().split()))])
S=str(input())
if S[0]=='1':s[0]='9'
if S[0]=='9':s[0]='1'
if S[1]=='1':s[1]='9'
if S[1]=="9":s[1]="1"
if S[2]=='1':s[2]='9'
if S[2]=='9':s[2]='1'
print(s)


### FIXED CODE ###

S = str(input())
print( 100*(10-int(S[0])) + 10*(10-int(S[1])) + 1*(10-int(S[2])) )
import datetime

a  = (datetime.datetime.strptime('2019/04/30', '%Y/%m/%d') - datetime.datetime.strptime(input(), '%Y/%m/%d')).days

print('Heisei' a >= 0 else 'TBD')


### FIXED CODE ###

import datetime

# if not (datetime.datetime.strptime('2019/04/30', '%Y/%m/%d') - datetime.datetime.strptime(input(), '%Y/%m/%d')):
#     print('Heisei')
# else:
#     print('TBD')
a  = (datetime.datetime.strptime('2019/04/30', '%Y/%m/%d') - datetime.datetime.strptime(input(), '%Y/%m/%d')).days
if a >= 0:
    print('Heisei')
else:
    print('TBD')
n=int(input())
a=list(map(int,input().split()))
count=0
flag=1
num=10*9+1
for i in range(n):
  if a[i]<0:
    count+=1
    a[i]*=-1
  elif a[i]==0:
    flag=0
  if num>a[i]:
    num=a[i]
if count%2==0 or flag=0:
  print(sum(a))
else:
  print(sum(a)-2*num)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
count=0
flag=1
num=10*9+1
for i in range(n):
  if a[i]<0:
    count+=1
    a[i]*=-1
  elif a[i]==0:
    flag=0
if count%2==0 or flag==0:
  print(sum(a))
else:
  print(sum(a)-2*min(a))
N = int(input())
T = [0]*10000
X= [0]*10000
Y= [0]*10000
x = 0
y = 0

for n in range(N):
        T[n],X[n],Y[n] = (map(int, input().split()))

flag = 1
for n in range(N):
    #print(n)
    if flag == 0:
        continue

    if n == 0:
        count = T[n]
    else:
        count = T[n] - T[n-1]
        x = X[n-1]
        y = Y[n-1]
    c = 0
    end = 0
    while True:
        if end == 1:
            break
        s_x = X[n] - x
        s_y = Y[n] - y
        #print(str(x)+' '+str(y))

        if ((s_x >= 0 or s_y >= 0) )and (c!=count):
            if s_x >0:
                x +=1
                c += 1
            elif s_x < 0:
                x -= 1
                c+=1
            elif s_y > 0:
                y +=1
                c += 1
            elif s_y < 0:
                y -= 1
                c+=1
            elif s_x==0:
                x +=1
                c +=1
        elif c==count:
            if (x == X[n] and y ==Y[n]):
                flag = 1
                end=1
            else:
                flag=0
                end =1


if flag == 1:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

N = int(input())
T = [0]*100000
X= [0]*100000
Y= [0]*100000
x = 0
y = 0

for n in range(N):
        T[n],X[n],Y[n] = (map(int, input().split()))

flag = 1
for n in range(N):
    #print(n)
    if flag == 0:
        continue


    if n == 0:
        count = T[n]
    else:
        count = T[n] - T[n-1]
        x = X[n-1]
        y = Y[n-1]
    c = 0
    end = 0
    while True:
        if end == 1:
            break
        s_x = X[n] - x
        s_y = Y[n] - y
    #    print(str(s_x)+' '+str(s_y))

        if ((s_x != 0 or s_y !=0) )and (c!=count):
            if s_x >0:
                x +=1
                c += 1
            elif s_x < 0:
                x -= 1
                c+=1
            elif s_y > 0:
                y +=1
                c += 1
            elif s_y < 0:
                y -= 1
                c+=1
        elif  ((s_x == 0 and s_y == 0) )and (c!=count):
                x +=1
                c +=1
        elif c==count:
            if (x == X[n] and y ==Y[n]):
                flag = 1
                end=1
            else:
                flag=0
                end =1



if flag == 1:
    print('Yes')
else:
    print('No')
A,B=input().split()
A=int(A)
B=int(B)
 
turn=0
while(1):
	if(turn==K):
		break
	if(turn%2==0):#高橋くん
		if(A%2==1):
			A-=1
	else:#青木くん
		if(B%2==1):
			B-=1
	turn+=1
print(A+" "+B)
 

### FIXED CODE ###


A,B,K=input().split()
A=int(A)
B=int(B)
K=int(K)
turn=0
while(1):
	if(turn==K):
		break
	if(turn%2==0):#高橋くん
		if(A%2==1):
			A-=1
		B+=A//2
		A-=A//2
	else:#青木くん
		if(B%2==1):
			B-=1
			
		A+=B//2
		B-=B//2
	turn+=1
print(str(A)+" "+str(B))
a=variable
b=variable_2
a=9
b=9
if a*b=81;
	print("81")
else;
	print("-1")

### FIXED CODE ###

entrada = input().split();
numeros =[int(entrada[0]),int(entrada[1])] 
if(numeros[0]>=1 and numeros[0]<=9 and numeros[1]>=1 and numeros[1]<=9):
	print(numeros[0]*numeros[1])
else:
	print(-1)