Harryxun/stf_run huggingface dataset:
import Collections
A,B=map(int,input().split())
def gcd(a,b):
  if b == 1:
    return a
  return furui(b,a%b)

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

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

### FIXED CODE ###

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

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

print(len(list(collections.Counter(prime_factorize(gcd(A,B))).keys()))+1)
A, B = map(float, input().split())

print(int(math.floor(int(B*100) * A /100)))

### FIXED CODE ###

a, b = input().split()
a = int(a)
b = round(100*float(b))
print(a*b//100)
def main():
    
    n = int(input())
    a = []
    for i in range(n): 
        a.append( 1/int(input()))

    print(sum(a))
    

if __name__ == "__main__":
    main()

### FIXED CODE ###

n = int(input())
a = [1/int(e) for e in input().split()]

print(1/sum(a))
def sub_k(string, I, K):
    temp = []
    for i in range(len(string)):
        if i-1+I == len(string):
            continue
        temp.append(string[i:i+I])
    return sorted(set(temp))[0:K]

def main(string, K):
    for i in range(K):
        print(sub_k(string, i+1, K-i))

string = input()
K = input()
main(string, K)

### FIXED CODE ###

def sub_k(string, I, K):
    temp = []
    for i in range(len(string)):
        if i-1+I == len(string):
            break
        temp.append(string[i:i+I])
    return sorted(set(temp))[0:K]

def main(string, K):
    result = []
    for i in range(K):
        result += sub_k(string, i+1, K-i)
    print(sorted(set(result))[K-1])

string = input()
K = int(input())
main(string, K)
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,b,c,d=input().split()

if a+b<c+d:
	print("Right")
elif: a+b>c+d:
	print("Left")
else:
	print("Balanced")

### FIXED CODE ###

import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,b,c,d=map(int,input().split())

if a+b<c+d:
	print("Right")
elif a+b>c+d:
	print("Left")
else:
	print("Balanced")
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(m)]
parent = [i for i in range(n)]
count = [1 for i in range(n)]

def root(i):
    if i == parent[i]:
        return i
    parent[i] = root(parent[i])
    return parent[i]

def merge(i, j):
    parent[j] = i
    count[i] += count[j]

ret = [0] * m + [n * (n - 1) // 2]
for i in range(m - 1, -1, -1):
    a, b = ab[i]
    ra, rb = root(a - 1), root(b - 1)
    if ra == rb:
        ret[i] = ret[i + 1]
    else:
        ret[i] = ret[i + 1] - count[ra] * count[rb]
        merge(ra, rb)

for i in range(1, m + 1):
    print(ret[i])


### FIXED CODE ###

n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(m)]
group = [i for i in range(n)]
islands = {i: [i] for i in range(n)}
ret = [0] * m + [n * (n - 1) // 2]
for i in range(m - 1, -1, -1):
    a, b = ab[i]
    ga, gb = group[a - 1], group[b - 1]
    if ga == gb:
        ret[i] = ret[i + 1]
    else:
        la, lb = len(islands[ga]), len(islands[gb])
        ret[i] = ret[i + 1] - la * lb
        if la > lb:
            for j in islands[gb]:
                group[j] = ga
                islands[ga].append(j)
        else:
            for j in islands[ga]:
                group[j] = gb
                islands[gb].append(j)
for i in range(1, m + 1):
    print(ret[i])
R=int(input())
print(2*R*3.1415926535

### FIXED CODE ###

R=int(input())
print(2*R*3.1415926535)
# import sys
# import math #sqrt
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# import itertools
# import collections # deque
# from operator import itemgetter
# from fractions import Fraction

mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

def main():
    n,k = map(int,input().split())
    f = abs(n-k)
    print(max(f,k)%min(f,k))
    return

if __name__=='__main__':
    main()

### FIXED CODE ###

# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
#     combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n,k = readInt()
    ans = n % k
    ans = min(ans,abs(ans-k))
    print(ans)
    return

if __name__=='__main__':
    main()
import math

n, X = map(int, input().split())
x = list(map(int, input().split()))

d = [0 for _ in range(n)]
for i in range(n):
    d[i] = abs(x[i] - X)

d = sorted(list(set(d)))

if n == 1:
    print(d[0])
    exit()

ans = d[0]
for i in range(1, len(d)):
    ans = math.gcd(ans, d[i])

print(ans)

### FIXED CODE ###

n, X = map(int, input().split())
x = list(map(int, input().split()))

d = [0 for _ in range(n)]
for i in range(n):
    d[i] = abs(x[i] - X)

d = sorted(list(set(d)))

if n == 1:
    print(d[0])
    exit()

def calc_gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    c = a % b
    return calc_gcd(b, c)

ans = d[0]
for i in range(1, len(d)):
    ans = calc_gcd(ans, d[i])

print(ans)
n = int(input())
A = list(map(int, input().split()))
max_A = max(A)
import math
from collections import Counter
def sieve_of_erastosthenes(num):
    input_list = [False if i % 2 == 0 or i % 3 == 0 or i % 5 == 0 else True for i in range(num)]
    input_list[0] = input_list[1] = False
    input_list[2] = input_list[3] = input_list[5] = True
    sqrt = math.sqrt(num)
    for serial in range(3, num, 2):
        if serial >= sqrt:
            return input_list
        for s in range(serial ** 2, num, serial):
            input_list[s] = False
if max_A >= 8:
    input_list = sieve_of_erastosthenes(max_A + 1)
    prime_list = [i for i, b in enumerate(input_list) if b == True]
else:
    input_list = [2, 3, 5, 7]
    prime_list = [num for num in input_list if num <= max_A]
#print(prime_list)


cnt = Counter()
set_primes = set(prime_list)
for a in A:
    soinsu = []
    for prime in prime_list:
        if prime ** 2 > a:
            break
        if a % prime == 0:
            soinsu.append(prime)
            if a // prime in set_primes:
                soinsu.append(a // prime)
    if a in set_primes:
        soinsu.append(a)

    for num in list(set(soinsu)):
        cnt[num] += 1
#print(cnt)

max_cnt = max(cnt.values())
if max_cnt == 1:
    print("pairwise coprime")
elif max_cnt == n:
    print("not coprime")
else:
    print("setwise coprime")

### FIXED CODE ###

from math import gcd
n = int(input())
A = list(map(int, input().split()))
min_A = min(A)
max_A = max(A)

def is_pairwise():
    arr = [0] * (max_A + 1)
    for a in A:
        arr[a] += 1
    max_counter = 0
    for num in range(2, max_A + 1):
        counter = 0
        for i in range(1, 10**6 + 1):
            try:
                counter += arr[num * i]
            except:
                break
        max_counter = max(max_counter, counter)
    if max_counter == 1:
        return True
    else:
        return False

if min_A == 1 and max_A == 1:
    print("pairwise coprime")
elif min_A == 1 and max_A != 1:
    A = [num for num in A if num != 1]
    if is_pairwise():
        print("pairwise coprime")
    else:
        print("setwise coprime")
else:
    if is_pairwise():
        print("pairwise coprime")
    else:
        g = A[0]
        for a in A:
            g = gcd(a, g)
        if g == 1:
            print("setwise coprime")
        else:
            print("not coprime")
n = int(input())
c = 0
c1=0
for x in range(n):
  a,b = map(int,input().split())
  if a==b:
    c+=1
    if c==3:
        c1 = 1
      print('Yes')
      break
  else:
    c=0
if c1==0:
    print('No')

### FIXED CODE ###

n = int(input())
c = 0
c1=0
for x in range(n):
  a,b = map(int,input().split())
  if a==b:
    c+=1
    if c==3:
        c1 = 1
        print('Yes')
        break
  else:
    c=0
if c1==0:
    print('No')
x,y = map(int,input().split())

if (x==1)&(y==2):
    print('3')
elif (x==2)&(y==3):
    print('1')
elif x==3 & y==1:
    print('2')
elif x==1 & y==3:
    print('2')
elif x==2 & y==1:
    print('3')
else:print('1')

### FIXED CODE ###

x = int(input())
y = int(input())

if (x==1)&(y==2):
    print('3')
elif (x==2)&(y==3):
    print('1')
elif (x==3) & (y==1):
    print('2')
elif (x==1) & (y==3):
    print('2')
elif (x==2) & (y==1):
    print('3')
elif (x==3) & (y==2):
    print('1')
a,b,c = map(int,iput().split())
if b + a - c > 0:
	print(b+c)
else:
	print(a+2*b+1)

### FIXED CODE ###

a,b,c = map(int,input().split())
if b + a - c + 1 >= 0:
	print(b+c)
else:
	print(a+2*b+1)
s = input()
newS = ""

for i in range(len(s)):
    if s[i]=="?" and len(s)!= 1 and i==0 and s[i+1]=="D":
        newS+="P"
    elif len(s)&1 and i==len(s)-1 and s[i]=="?":
        newS+="D"
    elif s[i]=="?":
        if newS[i-1]=="P":
            newS+="D"
        elif newS[i-1]=="D" and (s[i+1]=="D" or s[i+1]=="?"):
            newS+="P"
    else:
        newS+=s[i]
print(newS)


### FIXED CODE ###

s = input()
newS = ""
for i in range(len(s)):
    if s[i]=="?":
        newS+="D"
    else:
        newS+=s[i]
print(newS)
def f(k):
    if k==1:return d
    if k==0:return 0
    if k in dic:return m[k]
    s=k*d
    s=min(s,f(k//2)+a+k%2*d,f((k+1)//2)+a+-k%2*d,f(k//3)+b+k%3*d,f((k+2)//3)+b+-k%3*d,f(k//5)+c+k%5*d,f((k+4)//5)+c+-k%5*d)
    m[k]=s
    return s
for _ in range(int(input())):
    m={}
    n,a,b,c,d=map(int,input().split())
    print(s(n))

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000000)
input = sys.stdin.readline
t=int(input())
INF=10**19
def dfs(k):
    if k==1:return d
    if k==0:return 0
    if k in dic:return dic[k]
    ans=k*d
    ans=min(ans,dfs(k//2)+a+k%2*d,dfs((k+1)//2)+a+-k%2*d,dfs(k//3)+b+k%3*d,dfs((k+2)//3)+b+-k%3*d,dfs(k//5)+c+k%5*d,dfs((k+4)//5)+c+-k%5*d)
    dic[k]=ans
    return ans
for _ in range(t):
    dic={}
    n,a,b,c,d=map(int,input().split())
    print(dfs(n))
import numpy as np
n=input()
n=int(n) 
d=input()
d=int(d) 
count=0
for i in range(n):
  x=input()
  y=input()
  x=int(x)
  y=int(y)
  dist=((x**2) + (y**2))**0.5
  if dist<=d:
    count+=1
print(count) 

### FIXED CODE ###


n,d= input().split(" ")
n=int(n)
d=int(d) 
count=0
for i in range(n):
  x,y= input().split(" ")
  x=int(x)
  y=int(y) 
  dist=((x**2) + (y**2))**0.5
  if dist<=d:
    count+=1
print(count)
a,b=list(map(int,input().split()))
print(max([a+b,a-b,a*b])

### FIXED CODE ###

a,b=list(map(int,input().split()))
print(max([a+b,a-b,a*b]))
'''
.append(要素) リストに要素を追加 
.extend(リスト) リストを連結する
.insert(場所,要素) 指定した場所に要素追加
del 配列名[場所]
-1で末尾で末尾から一つ前

sort()
sorted(reverse=true)

配列の初期化
配列名=[a]*n+[b]*m

Decimal()
'''

from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math
import itertools
from functools import reduce
from operator import mul

f = [int(s) for s in stdin.readline().rstrip().split()]
N = f[0]
K = f[1]
p = list(map(lambda x: 1/2+x/2, [int(s)
                                 for s in stdin.readline().rstrip().split()]))

E = []
tmp = 0
for el in p:
    tmp += el
    E.append(tmp)

past = -20000
for el in range(len(E)):
    if el - K < 0:
        continue
    e = E[el] - E[el - K]
    if past < e:
        past = e
print(e)


### FIXED CODE ###

'''
.append(要素) リストに要素を追加 
.extend(リスト) リストを連結する
.insert(場所,要素) 指定した場所に要素追加
del 配列名[場所]
-1で末尾で末尾から一つ前

sort()
sorted(reverse=true)

配列の初期化
配列名=[a]*n+[b]*m

Decimal()
'''

from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math
import itertools
from functools import reduce
from operator import mul


color = stdin.readline().rstrip().split()
nums = [int(s) for s in stdin.readline().rstrip().split()]
tar = stdin.readline().rstrip()
for el in range(2):
    if color[el] == tar:
        nums[el] -= 1
res = [str(s) for s in nums]
print(' '.join(res))
iro = []
iro_i = []
res = []
r = 0
cm = []
for i in range(N+1):
  cm.append([])
N = int(input())
for i in range(N-1):
  a,b = input().split(" ")
  a = int(a)
  b = int(b)
  for cr in set(iro_i) - set(cm[a] + cm[b]):
    res.append(cr+1)
    cm[a].append(cr)
    cm[b].append(cr)
    break
  else:
    iro_i.append(r)
    cm[a].append(r)
    cm[b].append(r)
    res.append(r+1)
    r+=1
print(r+1)
for i in res:
  print(i)




### FIXED CODE ###

import sys
from collections import deque
read = sys.stdin.read

N, *ab = map(int, read().split())

graph = [[] for _ in range(N + 1)]
 
for a, b in zip(*[iter(ab)] * 2):
    graph[a].append(b)
 
color = [0] * (N + 1)
queue = deque([1])
 
while queue:
    V = queue.popleft()
    number = 1
    for v in graph[V]:
        if number == color[V]:
            number += 1
        color[v] = number
        queue.append(v)
        number += 1
 
print(max(color))
for a, b in zip(*[iter(ab)] * 2):
    print(color[b])
A, B = map(int, input())
print('error' if A + B >= 10 else A + B)

### FIXED CODE ###

A, B = map(int, input().split())
print('error' if A + B >= 10 else A + B)
import math
a,b = map(int,input().split())
print((a*b)//math.gcd(a,b))

### FIXED CODE ###

def lcm(a,b):
  lar = max(a, b) 
  small = min(a, b) 
  i = lar 
  while(1) : 
    if (i % small == 0): 
      return i 
    i += lar 

x,y = map(int,input().split())
print(lcm(x,y))
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
s=min([k for k in [a%10,b%10,c%10,d%10,e%10] if k>0])
ans = (a//10+(a%10!=0))*10+(b//10+(b%10!=0))*10+(c//10+(c%10!=0))*10+(d//10+(d%10!=0))*10+(e//10+(e%10!=0))*10-10+s
print(ans)

### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
s=[k for k in [a%10,b%10,c%10,d%10,e%10] if k>0]
if s==[]:
  t=0
else:
  t=min(s)
ans = (a//10+(a%10!=0))*10+(b//10+(b%10!=0))*10+(c//10+(c%10!=0))*10+(d//10+(d%10!=0))*10+(e//10+(e%10!=0))*10+(s!=[])*(-10+t)
print(ans)
import sys
input = sys.stdin.readline

def make_Graph(N, edges):#頂点の名前はi - 1で受け付ける
    graph = [ [] for i in range(N)]
    for edge in edges:
        a, b, c = edge
        graph[a].append((b,c))
        graph[b].append((a,c))
    return graph

def BFS(N, graph, start):
    Q = []
    V = []
    prev = [None] * N
    d = [float("inf")] * N
    Q.append(start)
    d[start] = 0
    while len(V) < N:
        a = Q.pop(0)
        V.append(a)
        for b, c in graph[a]:
            if b != prev[a]:
                Q.append(b)
                prev[b] = a
                d[b] = d[a] + c
    return d

def DFS(N, graph, a, p, d):
    dd[a] = d
    for b, c in graph[a]:
        if b == p or dd[b] != 0:
            continue
        else:
            DFS(N, graph, b, a, d + c)

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

Q, K =(int(i) for i in input().split())
dd = [0] * N
DFS(N, graph, K-1, -1, 0)
for i in range(Q):
    x, y = (int(a) for a in input().split())
    print(dd[x-1] + dd[y-1])

### FIXED CODE ###

import sys
input = sys.stdin.readline

def make_Graph(N, edges):#頂点の名前はi - 1で受け付ける
    graph = [ [] for i in range(N)]
    for edge in edges:
        a, b, c = edge
        graph[a].append((b,c))
        graph[b].append((a,c))
    return graph

def BFS(N, graph, start):
    Q = []
    V = []
    prev = [None] * N
    dd = [float("inf")] * N
    Q.append(start)
    dd[start] = 0
    while len(V) < N:
        a = Q.pop(0)
        V.append(a)
        for b, c in graph[a]:
            if b != prev[a]:
                Q.append(b)
                prev[b] = a
                dd[b] = dd[a] + c
    return dd

def DFS(N, graph, a, p, d):
    dd[a] = d
    for b, c in graph[a]:
        if b == p or dd[b] != 0:
            continue
        else:
            DFS(N, graph, b, a, d + c)

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

Q, K =(int(i) for i in input().split())
dd = [0] * N

try:
    DFS(N, graph, K-1, -1, 0)
except:
    dd = BFS(N, graph, K-1)

for i in range(Q):
    x, y = (int(a) for a in input().split())
    print(dd[x-1] + dd[y-1])
A, B = list(map(float, input().split()))

print(int(int(A)*B+0.5)))


### FIXED CODE ###

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

a = int(A)
b = int(B[0])
b2 = int(B[2:4])
#print(b)
#print(b2)
#print(b)


t = a*b
#print(t)
#b3 = b*100
bb = a*b2
tmp = bb//100
#print(tmp)
#print(a*b)
bef = tmp+t
ans = str(bef)

print(ans)
#解説より
cost=[0,2,5,5,4,5,6,3,7,6]
N,M=map(int,input().split())
A=sorted(map(int,input().split()))[::-1]
dp=[0]
for i in range(1,N+1):
    l=[dp[i-cost[a]]for a in A if i>=cost[a]]
    if len(l)==0:dp+=[-1]
    else:dp+=[max(l)+1]
S=''
Sum=0
for i in range(dp[N]):
    for a in A:
        if dp[N-Sum-cost[a]]==dp[N]-1-i:
            S+=str(a)
            Sum+=cost[a]
            break
print(S)

### FIXED CODE ###

#解説より
cost=[0,2,5,5,4,5,6,3,7,6]
N,M=map(int,input().split())
A=sorted(map(int,input().split()))[::-1]
dp=[0]
for i in range(1,N+1):
    l=[dp[i-cost[a]]for a in A if i>=cost[a]]
    if len(l)==0:dp+=[-1]
    else:dp+=[max(l)+1]
S=''
Sum=0
for i in range(dp[N]):
    for a in A:
        if N-Sum-cost[a]>=0 and dp[N-Sum-cost[a]]==dp[N]-1-i:
            S+=str(a)
            Sum+=cost[a]
            break
print(S)
k = int(input())
s = raw_input()
n = len(s)
     
if n <= k:
	print(s)
else:
	print(s[:k] + '...')

### FIXED CODE ###

k = int(input())
s = input()
n = len(s)
     
if n <= k:
	print(s)
else:
	print(s[:k] + '...')
#!/usr/bin/env python3
# atcoder 
# Türkçe konuşyorum
# Türkler var mı
# memnün oldum

K = int(input())
S = input()
slen = len(S)



if(slen <= K):
    print(S)
else:
    change = S[K:]
    for i in range(3):
        change = change.replace(change[i], '.')
    print(S[:K] + change[:3])



### FIXED CODE ###

#!/usr/bin/env python3
# atcoder 
# Türkçe konuşyorum
# Türkler var mı
# memnün oldum

K = int(input())
S = input()



if(len(S) <= K):
    print(S)
else:
    print(S[:K] + '.' * 3)
    #for i in range(3):
    #    change = change.replace(change[i], '.')
    #print(S[:K] + change[:3])
import math

s = input().split()

A = int(s[0])
B = float(s[1])

seisu = math.floor(B)
daiiti = math.floor(B*10)/10 - seisu
daini = B - seisu - daiiti

big = A*seisu
small = A*(int(daiiti*10))
if small >= 10:
  small = int(str(small)[:-1])
else:
  small = 0
too_small = A*(int(daini*100))
if too_small >= 100:
  too_small = int(str(small)[:-2])
else:
  too_small = 0

print(big+small+too_small)

### FIXED CODE ###

s = input().split()

A = int(s[0])
B = int(s[1].replace(".", ""))
m = A*B

if m>=100:
  result = int(str(m)[:-2])
else:
  result = 0
  
print(result)
import math
n = int(input())
c = n

def is_prime(n)
	for i in range(2, math.sqrt(n)+1):
    	if n % i == 0:
        	return False
    return True


while True:
  if is_prime(c):
    print(c)
    exit(0)
  else:
    c+=1

### FIXED CODE ###

import math
n = int(input())
c = n


def is_prime(n):
    for i in range(2, int(math.sqrt(n)+1)):
        if n % i == 0:
            return False
    return True


while True:
    if is_prime(c):
        print(c)
        exit(0)
    else:
        c+=1
H, W = map(int, input().split())
S = [input() for _ in range(H)]

ans = [[0 for _ in range(W)] for _ in range(H)]

for i in range(H):
    for j in range(W):
        if S[i][j] == "#":
            ans[i][j] = "#"
        else:
            if 0 < i and i < H-1:
                li = [i-1, i, i+1]
            elif i == 0:
                li = [i, i+1]
            else:
                li = [i-1, i]
            if 0 < j and j < W-1:
                lj = [j-1, j, j+1]
            elif j == 0:
                lj = [j, j+1]
            else:
                lj = [j-1, j]
            ans[i][j] = str(sum([S[lii][ljj]=="#" for lii in li for ljj in lj]))

for i in range(H):
    s = "".join(ans[i])
    print(s)


### FIXED CODE ###

H, W = map(int, input().split())
S = [list(input()) for _ in range(H)]
for i in range(H):
	for j in range(W):
		if S[i][j] == ".":
			cnt = 0
			if i != 0:
				cnt += S[i - 1][max(0, j - 1): min(j + 1, W - 1) + 1].count("#")
			cnt += S[i][max(0, j - 1): min(j + 1, W - 1) + 1].count("#")
			if i != H - 1:
				cnt += S[i + 1][max(0, j - 1): min(j + 1, W - 1) + 1].count("#")
			S[i][j] = str(cnt)
for x in range(H):
	print("".join(S[x]))
import math

def combi(n ,k):
    return math.factorial(n)//(math.factorial(k)*math.factorial(n-k))

bignum = 1000000007

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

for i in range(1,K+1):
    tmp = combi(R+1,i) * combi(K-1,i-1)
    print(tmp % bignum)

### FIXED CODE ###

import math

def combi(n ,k):
    return math.factorial(n)//(math.factorial(k)*math.factorial(n-k))

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

for i in range(1,K+1):
    if R + 1 >= i:
        tmp = combi(R+1,i) * combi(K-1,i-1)
    else:
        tmp = 0
    print(tmp % (10**9+7))
import sys

def log(*args, **kwargs):
    print(*args, **kwargs, file=sys.stderr)

log("hogehoge")

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

print(max(a*b, a+b, a-b))

### FIXED CODE ###

import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

a,b = get_nums_l()
print(max(a+b, a-b, a*b))
def resolve():
    from fractions import gcd
    n = int(input())
    a = list(map(int, input().split()))
    mod = 10**9 + 7
    lsd = a[0]
    for i in range(1, n):
        lsd = (lsd * a[i]) // gcd(lsd, a[i])

    ans = 0
    for i in range(n):
        ans += (lsd/a[i]) % mod

    print(int(ans % mod))

resolve()

### FIXED CODE ###

def resolve():
    def lcm(X, Y):
        x = X
        y = Y
        if y > x:
            x, y = y, x
        while x % y != 0:
            x, y = y, x % y
        return X * Y // y
    n = int(input())
    a = list(map(int, input().split()))
    mod = 10**9 + 7
    lsd = a[0]
    for i in range(1, n):
        lsd = lcm(lsd, a[i])
    lsd = lsd % mod

    ans = 0
    for i in range(n):
        ans += (lsd * pow(a[i], mod-2, mod)) % mod

    print(int(ans % mod))

resolve()
a = int(input())
b = int(input())
c = int(input())

area = (a+b)*h%2
print(area)

### FIXED CODE ###

a = int(input())
b = int(input())
h = int(input())
 
area = (a + b)*h//2
print(area)
N = input() 
A = list(map(int,input().split()))
c = 1
i = 0
for i in N-1:
    if c *= A[i] >= 10**18:
      print(-1)
      exit()
    else:
      print(c)
  




### FIXED CODE ###

n=int(input())
ls=[int(s) for s in input().split(" ")]

if 0 in ls:
  print(0)
else:
  num=1
  for i in ls:
    num*=i
    if num>10**18:
      num=-1
      break

  print(num)
import collections
import itertools
import functools
import math

s = set([])
if __name__ == "__main__":
    n = math.factorial(int(input()))
    prims = (n + 1) * [0]
    p = 2
    while n >= p*p:
        if n % p == 0:
            prims[p] += 1
            n = n // p
        else:
            p += 1
    prims[n] += 1
    print(functools.reduce(lambda x, y: x * (y + 1), prims, 1) % (10**9 + 7))

### FIXED CODE ###

import collections
import itertools
import functools
import math

s = set([])
if __name__ == "__main__":
    n = int(input())
    m = math.factorial(n)
    res = 1
    for j in range(2, n + 1):
        tmp = 1
        while m % j == 0:
            m = m//j
            tmp += 1
        res *= tmp
    print(res % (10**9 + 7))