Harryxun/stf_run huggingface dataset:
input = raw_input

x = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i: # choufuku
                divisors.append(n//i)
    # divisors.sort()
    return divisors

def f(x, d):
    out = (x+d) ** 5 - x ** 5
    return out

ds = make_divisors(x)
#print("ds", ds)

found = False
for d in ds:
    if found:
        break

    b = 0
    while True:
        aa = b+d
        bb = b
        ret = f(b, d)
        #print(aa, bb, d, ret)
        
        if x == ret:
            found = True
            a = b+d
            b = b
            break
        elif ret > x:
            break
        b += 1

    if found:
        break

    b = -1
    while True:
        aa = b+d
        bb = b

        ret = f(b, d)
        #print(aa, bb, d, ret)
        
        if x == ret:
            found = True
            a = b+d
            b = b
            break
        elif ret > x:
            break
        b -= 1

assert found
print("%d %d" % (a, b))

### FIXED CODE ###

input = raw_input

x = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i: # choufuku
                divisors.append(n//i)
    # divisors.sort()
    return divisors

def f(x, d):
    out = (x+d) ** 5 - x ** 5
    return out

ds = make_divisors(x)
#ds = ds1 + [-d for d in ds1]
#print("ds", ds)

found = False
for d in ds:
    if found:
        break

    d0 = d
    if d0 % 2 == 0:
        b = -d0 // 2
    else:
        b = -d0 // 2 + 1

    while True:
        aa = b+d
        bb = b
        ret = f(b, d)
        #print(aa, bb, d, ret)
        
        if x == ret:
            found = True
            a = b+d
            b = b
            break
        elif ret > x:
            break
        b += 1

    if found:
        break

    #b = -1
    if d0 % 2 == 0:
        b = -d0 // 2
    else:
        b = d0 // 2 - 1

    while True:
        aa = b+d
        bb = b

        ret = f(b, d)
        #print(aa, bb, d, ret)
        
        if x == ret:
            found = True
            a = b+d
            b = b
            break
        elif ret > x:
            break
        b -= 1

    if found:
        break

    d0 = d
    d = -d
    
    if d0 % 2 == 0:
        b = d0 // 2
    else:
        b = d0 // 2 + 1

    while True:
        aa = b+d
        bb = b
        ret = f(b, d)
        #print(aa, bb, d, ret)
        
        if x == ret:
            found = True
            a = b+d
            b = b
            break
        elif ret < x:
            break
        b += 1

    if found:
        break

    if d0 % 2 == 0:
        b = d0 // 2
    else:
        b = d0 // 2 - 1
    while True:
        aa = b+d
        bb = b

        ret = f(b, d)
        #print(aa, bb, d, ret)
        
        if x == ret:
            found = True
            a = b+d
            b = b
            break
        elif ret < x:
            break
        b -= 1


assert found
print("%d %d" % (a, b))
import numpy as np
N = int(input())
S = [None]*5
for i in range(N):
    S[i] = input()

S_M = [S[i] for i in range(N) if S[i][0] == 'M']
S_A = [S[i] for i in range(N) if S[i][0] == 'A']
S_R = [S[i] for i in range(N) if S[i][0] == 'R']
S_C = [S[i] for i in range(N) if S[i][0] == 'C']
S_H = [S[i] for i in range(N) if S[i][0] == 'H']

souwa = 0
kahi = [0]*5
kahi[0] = len(S_M)
kahi[1] = len(S_A)
kahi[2] = len(S_R)
kahi[3] = len(S_C)
kahi[4] = len(S_H)

for i in range(len(kahi)-2):
    for j in range(i+1, len(kahi)-1):
        for k in range(j+1, len(kahi)):
            souwa += kahi[i]*kahi[j]*kahi[k]
print(souwa)

### FIXED CODE ###

import numpy as np
N = int(input())
S = [None]*N
for i in range(N):
    S[i] = input()

S_M = [S[i] for i in range(N) if S[i][0] == 'M']
S_A = [S[i] for i in range(N) if S[i][0] == 'A']
S_R = [S[i] for i in range(N) if S[i][0] == 'R']
S_C = [S[i] for i in range(N) if S[i][0] == 'C']
S_H = [S[i] for i in range(N) if S[i][0] == 'H']

souwa = 0
kahi = [0]*5
kahi[0] = len(S_M)
kahi[1] = len(S_A)
kahi[2] = len(S_R)
kahi[3] = len(S_C)
kahi[4] = len(S_H)

for i in range(len(kahi)-2):
    for j in range(i+1, len(kahi)-1):
        for k in range(j+1, len(kahi)):
            souwa += kahi[i]*kahi[j]*kahi[k]
print(souwa)
n = int(input())
p = list(map(int, input().split()))

count = 0

for i in range(n):
  if p[i]<p[i+1]<p[i+2] or p[i+2]<p[i+1]<p[i]:
    ans += 1
    
print(ans)


### FIXED CODE ###

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

count = 0

for i in range(n-2):
  if p[i]<p[i+1]<p[i+2] or p[i+2]<p[i+1]<p[i]:
    count += 1
    
print(count)
A,B,C,D,E,F = map(int,input().split())
W=set()
for a in range(0,F+1,100*A):
    for b in range(0,F+1-a,100*B):
        W.add(a+b)
S=set()
for c in range(0,F+1,C):
    for d in range(0,F+1,D):
        S.add(c+d)
rate = -1
for w in W:
    for s in S:
        if 0 < w+s <= F and s <= w*E//100:
            if s/(w+s) > rate:
                rate = s/(w+s)
                ans = w+s, s
print(ans[0],ans[1])

### FIXED CODE ###

n = int(input())
a = int(input())
print(n**2-a)
s = []
for i in range(5):
    s.apppend(int(input())
k = int(input())
for i in range(4):
    if s[i+1]-s[i] >k:
        print(":(")
        break
else:
    print("Yay!")

### FIXED CODE ###

s = []
for i in range(5):
    s.append(int(input()))
k = int(input())
for i in range(4):
    if s[i+1]-s[0] >k:
        print(":(")
        break
else:
    print("Yay!")
def inputlist():
	n=int(input())
	A=list()
	for i in range(15):
		if (i>=n):
			continue
		Ai = int(input())
		s=list()
		for i in range(Ai):
			s += input().split()
		s = [int(i) for i in s]
		A.append(s)
	return A

A=inputlist()
n=len(A)
anslist=list()
p = 0
for i in range(2**n):
	bit_str = str(format(i,'015b'))
	for j in range(n):
		if ((i >> j) & 1):
			for k in range(0,len(A[j]),2):
				if (int(bit_str[(-1*A[j][k])-1]) == A[j][k+1]):
					p = 1
					continue
				else:
					p = 0
					break
	if (p):
		anslist.append(bit_str.count('1'))
	else:
		anslist.append(0)
print(max(anslist))

### FIXED CODE ###

def inputlist():
	n=int(input())
	A=list()
	for i in range(n):
		Ai = int(input())
		s=list()
		for i in range(Ai):
			s += input().split()
		s = [int(i) for i in s]
		A.append(s)
	return A
A=inputlist()
n=len(A)
ans=0
for i in range(2**n):
	p = 1
	bit_str = str(format(i,'015b'))
	for j in range(n):
		if ((i >> j) & 1):
			for k in range(0,len(A[j]),2):
				if not(A[j][k+1] == int(bit_str[-1*A[j][k]])):
					p = 0
	if (p):
		ans = max(ans,bit_str.count('1'))
print(ans)
x = raw_input()
 print((x) * 3)

### FIXED CODE ###

x = input()
print(int(x) ** 3)
l=input()
b=[]
for i in range(l)
    a=int(input())
    b.append(a)
print(sum(b)-max(b)/2)

### FIXED CODE ###

l=int(input())
b=[int(input()) for i in range(l)]
print(sum(b)-max(b)//2)
s=input()
a=s.count("hi")
b=len(s)
if b/a==2:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

s=input()
a=0
if s=="hi":
    a=1
elif s=="hihi":
    a=1
elif s=="hihihi":
    a=1
elif s=="hihihihi":
    a=1
elif s=="hihihihihi":
    a=1
if a==1:
    print("Yes")
else:
    print("No")
import math
from functools import reduce

n = int(input())
a_list = list(map(int, input().split()))
prime_list = list(range(math.ceil(a_list[n - 1] ** 0.5) + 1))

for i in range(2, prime_list[-1] + 1):
    if prime_list[i] != -1:
        for j in range(i * 2, prime_list[-1] + 1, i)
            prime_list[index] = -1
prime_list.sort()
del prime_list[0: prime_list.index(1) + 1]
check_list = [0] * len(prime_list)

def is_pairwise(num):
    for i, prime in enumerate(prime_list):
        if num % prime == 0:
            if check_list[i] == 1:
                return False
            else:
                check_list[i] += 1
    return True

for a in a_list:
    if not is_pairwise(a):
        if reduce(math.gcd, a_list) == 1:
            print("setwise coprime")
            exit()
        else:
            print("not coprime")
            exit()
print("pairwise coprime")


### FIXED CODE ###

import math
from functools import reduce
L = 10**6 + 1
n = int(input())
a_list = list(map(int, input().split()))
memo = [0] * L

for a in a_list:
    memo[a] += 1

for i in range(2, L):
    if sum(memo[i::i]) > 1:
        if reduce(math.gcd, a_list) == 1:
            print("setwise coprime")
            exit()
        else:
            print("not coprime")
            exit()

print("pairwise coprime")
N = int(input())
S = list(input())
alphabet = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
new_S = []
for i in range(len(S)):
  s = alphabet.index(S[i])+N
  new_S.append(alphabet[s])
print("".join(new_S))

### FIXED CODE ###

N = int(input())
S = list(input())
alphabet = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
new_S = []
for i in range(len(S)):
  s = alphabet.index(S[i])+N
  if s >= 26 :
    s -= 26
  new_S.append(alphabet[s])
print("".join(new_S))
import math
n, k = map(int, input().split())

mod = 10**9+7
sum = 0
for i in range(1,k+1):
    if n-k+1 < i:
        print(0)
    else:
        combi = math.factorial(k-1) / (math.factorial(i-1) * math.factorial(k-i))
        tmp = (math.factorial(n-k+i) / (math.factorial(n-k) * math.factorial(i)) - sum) * combi
        print(int(tmp%mod))
        sum += tmp


### FIXED CODE ###

import math
n, k = map(int, input().split())

def combination(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))
mod = 10**9+7
for i in range(1,k+1):
    if n-k+1 < i:
        print(0)
    else:
        print(combination(n-k+1, i)*combination(k-1, i-1)%mod)
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
mod = 1000000007
dp = [0] * (n + 1)
dp[0] = 1
dp[1] = dp[0] if not 1 in a else 0
for i in range(2, n + 1):
    if not i in a:
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
    else:
        dp[i]=  0
print(do[n])

### FIXED CODE ###

n, m = map(int, input().split())
mod = 1000000007
a = [True] * (n + 1)
for i in range(m):
    a[int(input())] = False
dp = [0] * (n + 1)
dp[0] = 1

dp[1] = dp[0] if a[1] else 0

for i in range(2, n + 1):
    if a[i]:
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod

print(dp[n])
A,B map(int,input().split())
if A<=5:
    print(0)
elif A<=12:
    print(B/2)
else:
    print(B)

### FIXED CODE ###

A,B = map(int,input().split())
if A<=5:
    print(0)
elif A<=12:
    print(int(B/2))
else:
    print(B)
#coding:utf-8

import sys

N,X = map(int,input().split())
L = list(map(int,input().split()))

D = 0 #ジャンプする座標

for i in range(N+1):
    D += L[i]
    if D > X:
        print(i+1)
        sys.exit()

print(N+1)


### FIXED CODE ###

#coding:utf-8

import sys

N,X = map(int,input().split())
L = list(map(int,input().split()))

D = 0 #ジャンプする座標

for i in range(N):
    D += L[i]
    if D > X:
        print(i+1)
        sys.exit()

print(N+1)
import math
import sys
A, B = map(int, input().split())

def gcd(a, b):
  if b > a:
    a, b = b,a
  a, b = b, a % b
  if b == 0:
    return a
  else:
    return gcd(a, b)

def make_divisors(n):
  divisors = []
  for i in range(2, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
  divisors.append(N // divisors[-1])
  return divisors

N = gcd(A, B)
if N == 1:
  print (1)
  sys.exit()

D = make_divisors(N)
L = []
for i in D:
  for j in L:
    if i % j == 0:
      break
  else:
    L.append(i)
print (len(L)+1)

### FIXED CODE ###

import math
import sys
A, B = map(int, input().split())

def gcd(a, b):
  if b > a:
    a, b = b,a
  a, b = b, a % b
  if b == 0:
    return a
  else:
    return gcd(a, b)

def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
  divisors.append(N // divisors[-1])
  return divisors

N = gcd(A, B)
if N == 1:
  print (1)
  sys.exit()

D = make_divisors(N)
L = []
for i in D[1:]:
  for j in L:
    if i % j == 0:
      break
  else:
    L.append(i)
print (len(L)+1)
s=input()
 print((s.count("g")-s.count("p"))//2)

### FIXED CODE ###

s=input()
print((s.count("g")-s.count("p"))//2)
"""import sys
input = sys.stdin.readline"""
n=int(input())
if n==32:
    print(32)
    exit()
cntm=0
for i in range(1,n+1):
    a=i
    cnt=0
    while a%2==0:
        a//=2
        cnt+=1
    if cntm<cnt:
        ans=i
        cntm=cnt
print(ans)


### FIXED CODE ###


n=int(input())
cntm=0
ans=1
for i in range(1,n+1):
    a=i
    cnt=0
    while a%2==0:
        a//=2
        cnt+=1
    if cntm<cnt:
        ans=i
        cntm=cnt
print(ans)
h, w, H, W=map(int, input().split())
print(h*W+w*H-w*h)

### FIXED CODE ###

h, w=map(int, input().split())
H, W=map(int, input().split())

print((H-h)*(W-w))
N = int(input())

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

color = [0] * 8

a = 400 
free = 0
    
for i in range(0,N):
    if rate[i] < a:
        color[0] = 1
    elif a <= rate[i] < 2*a:
        color[1] = 1
    elif 2*a <= rate[i] < 3*a:
        color[2] = 1
    elif 3*a <= rate[i] < 4*a:
        color[3] = 1
    elif 4*a <= rate[i] < 5*a:
        color[4] = 1
    elif 5*a <= rate[i] < 6*a:
        color[5] = 1
    elif 6*a <= rate[i] < 7*a:
        color[6] = 1
    elif 7*a <= rate[i] < 8*a:
        color[7] = 1
    elif 8*a <= rate[i]:
        free += 1
        

min_color = 0
max_color = 0

min_color = color.count(1)
max_color = min_color + color[8]

print( max(min_color,1), max_color)

### FIXED CODE ###

N = int(input())

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

color = [0] * 8

a = 400 
free = 0
    
for i in range(0,N):
    if rate[i] < a:
        color[0] = 1
    elif a <= rate[i] < 2*a:
        color[1] = 1
    elif 2*a <= rate[i] < 3*a:
        color[2] = 1
    elif 3*a <= rate[i] < 4*a:
        color[3] = 1
    elif 4*a <= rate[i] < 5*a:
        color[4] = 1
    elif 5*a <= rate[i] < 6*a:
        color[5] = 1
    elif 6*a <= rate[i] < 7*a:
        color[6] = 1
    elif 7*a <= rate[i] < 8*a:
        color[7] = 1
    elif 8*a <= rate[i]:
        free += 1
        

min_color = 0
max_color = 0

min_color = color.count(1)
max_color = min_color + free

print( max(min_color,1), max_color)
n,x=map(int,input().split())
l=list(map(int,input().split()))
ans=1
d=[0]*n
for i in range (1,n+1):
    d[i]=d[i-1]+l[i-1]
    if d[i]<=x:
        ans=ans+1
    else:
        break
print(ans)


### FIXED CODE ###

n,x=map(int,input().split())
l=list(map(int,input().split()))
ans=1
d=0
for i in range (0,n):
    d+=l[i]
    if d<=x:
        ans=ans+1
print(ans)
N = int(input())

for i in range(17):
    if 10**i <=N <10**(i+1):
        m=i+1
        break

for j in range(1,10):
    if (10**(m-1))*j + 10**(m-1)-1 <=N< (j+1)*(10**(m-1))+10**(m-1)-1:
        a = j
        break

print(a+9*(m-1))

### FIXED CODE ###

N = int(input())

for i in range(17):
    if 10**i <=N <10**(i+1):
        m=i+1
        break

for j in range(0,10):
    if (10**(m-1))*j + 10**(m-1)-1 <=N< (j+1)*(10**(m-1))+10**(m-1)-1:
        a = j
        break

print(a+9*(m-1))
A, S, C = input()
print(A+S[0]+C)

### FIXED CODE ###

a, s, c = input().split()
print('A'+s[0]+'C')
N = int(input())
arr = map(int, input().split())
count = 0

for i in range(1, len(arr) + 1, 2):
    if arr[i] % 2 == 0:
        count += 1
        
print(count)

### FIXED CODE ###

N = int(input())
arr = tuple(map(int, input().split()))
count = 0

for i in range(0, N, 2):
    if arr[i] % 2 != 0:
        count += 1
        
print(count)
import math
def main():
    N, M = map(int, input().split())
    S = input()
    T = input()
    result = N * M / math.gcd(N, M)
    cand = (result / N) * (result / M) / math.gcd(int((result / N)), int((result / M)))
    for i in range(0, int(result / cand)):
        if S[int((i * cand) / (result / N))] != T[int((i * cand) / (result / M))]:
            return '-1'
    return int(result)
print(main())

### FIXED CODE ###

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

def main():
    N, M = map(int, input().split())
    S = input()
    T = input()
    result = N * M / gcd(N, M)
    cand = (result / N) * (result / M) / gcd(int((result / N)), int((result / M)))
    for i in range(0, int(result / cand)):
        if S[int((i * cand) / (result / N))] != T[int((i * cand) / (result / M))]:
            return '-1'
    return int(result)
print(main())
import math


def main():
    a, b, h, m = map(int, input().split())
    if h == 0 and m == 0:
        print(abs(b - a))
        exit()

    h_basho = h * 60 + m
    m_basho = m * 12
    h_m_basho = h_basho - m_basho

    if h_m_basho == 360:
        print(a + b)
        exit()
    elif h_m_basho < 360:
        kakudo = 90 * h_m_basho / 180
    else:
        kakudo = 90 * (720 - h_m_basho) / 180

    ab2 = a ** 2 + b ** 2
    cos = 2 * a * b * (round(math.cos(round(math.radians(kakudo)), 20), 20))

    if kakudo <= 90:
        ac = ab2 - cos
        print("%.20f" % math.sqrt(ac))
    else:
        ac = ab2 + cos
        print("%.20f" % math.sqrt(ac))


if __name__ == '__main__':
    main()


### FIXED CODE ###

import math


def main():
    a, b, h, m = map(int, input().split())
    th = (h * 60 + m) / 720 * 2 * math.pi
    tm = m / 60 * 2 * math.pi
    xh = a * math.cos(th)
    yh = a * math.sin(th)
    xm = b * math.cos(tm)
    ym = b * math.sin(tm)
    dx = xh - xm
    dy = yh - ym
    ans = math.sqrt(dx ** 2 + dy ** 2)
    print("%.10f" % ans)


if __name__ == '__main__':
    main()
a, b = (int(x) for x in input().split())
a = str(a)*b
b = str(b)*a
lis = [a, b]
new_lis = soted(lis)
print(new_lis[1])

### FIXED CODE ###

a, b = (int(x) for x in input().split())
a1 = str(a)*b
b1 = str(b)*a
lis = [a1, b1]
new_lis = sorted(lis)
print(new_lis[0])
N=int(input())
arrH=[int(i) for i in input().split()]

M=''.join(['C' if arrH[i]>=arrH[i+1] else ' ' for i in range(N-1)]).split()
print(max([len(i) for i in M]))


### FIXED CODE ###

N=int(input())
arrH=[int(i) for i in input().split()]

M=''.join(['C' if arrH[i]>=arrH[i+1] else ' ' for i in range(N-1)]).split()
print(0 if len(M)==0 else max([len(i) for i in M]))
import math
from functools import reduce

N, X = map(int, input().split())
L = list(map(int, input().split()))

# move1 = D
# move2 = -D


# D = 1のときは必ずゴールできる
ans = []
# 初期のXとそれ以外の街の差をDで割ったあまりが全て0なら訪れることができる
# つまりそれぞれの街の差を保存し、その最大公約数がDとなる
for i in range(N):
    dfe = abs(L[i] - X)
    ans.append(dfe)

ans = list(set(ans))

# reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]
# functoolsのreduceはある関数があり、それを前の計算結果と重なりを考慮しながら
# 関数に当てはめる、というアクションを繰り返す


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


# print(ans)
# print(reduce(lambda x, y: x + y, ans))
print(gcd_list(ans))

### FIXED CODE ###

import fractions
from functools import reduce

N, X = map(int, input().split())
L = list(map(int, input().split()))

# move1 = D
# move2 = -D


# D = 1のときは必ずゴールできる
ans = []
# 初期のXとそれ以外の街の差をDで割ったあまりが全て0なら訪れることができる
# つまりそれぞれの街の差を保存し、その最大公約数がDとなる
for i in range(N):
    dfe = abs(L[i] - X)
    ans.append(dfe)

ans = list(set(ans))

# reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]
# functoolsのreduceはある関数があり、それを前の計算結果と重なりを考慮しながら
# 関数に当てはめる、というアクションを繰り返す


def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)


# print(ans)
# print(reduce(lambda x, y: x + y, ans))
print(gcd_list(ans))
x,a,b = map(int, input())
if abs(x -a) > abs(x - b):
    print("B")
else:
    print("A")


### FIXED CODE ###

x,a,b = map(int, input().split())
if abs(x -a) >= abs(x - b):
    print("B")
else:
    print("A")
n = int(input())
t, x, y = map(int, input().split())
t1, x1, y1 = map(int, input().split())
s = t1 - t
d = x1 + y1 - x - y
p = (s > d) and (s - d) % 2 == 0
print("Yes" if p else "No")

### FIXED CODE ###

n = int(input())
t, x, y = 0, 0, 0
t1, x1, y1 = 0, 0, 0
p = False
for i in range(n):
	t, x, y = t1, x1, y1
	t1, x1, y1 = map(int, input().split())
	s = t1 - t
	d = x1 + y1 - x - y
	p = x >= 0 and y >= 0 and (abs(s) >= abs(d)) and ((s - d) % 2 == 0)
	# print("{},{}".format(s, d))
	if p == False:
		break
print("Yes" if p else "No")
n, m = map(int, input().split())
d = {i+1 : [] for i  in range(n)}
for _ in range(m):
    u, v = map(int, input().split())
    d[u].append(v)
s, t = map(int, input().split())
q = set([s])
visited = set([s])
c = 1
def solve():
    global visited, c, q
    while True:
        for v in list(q):
            q.remove(v)
            es =set([e3 for e1 in d[v] for e2 in d[e1] for e3 in d[e2] if not e3 in visited])
            if t in es:
                return c
            else:
                visited |= es
                q |= es
        if not len(q):
            return -1
        c += 1
print(solve())


### FIXED CODE ###

n, k = map(int, input().split())
N = 10 ** 9 + 7

def kai(a):
    res = 1
    for i in range(1, a+1):
        res = res * i
    return res

def cmb(n, r):
    return kai(n) // kai(r) // kai(n-r)
#
# for i in range(1, k + 1):
#     nao = cmb(k - 1, i - 1)
#     nak = cmb(n - k + 1,  i)
#     print(nao * nak % N)

ans = 0
for i in range(1, k+1):
    if i == 1:
        ans = cmb(k - 1, i - 1) * cmb(n - k + 1,  i)
    print(ans  % N)
    ans = ans * (k - i) // i * (n - k - i + 1) // (i + 1)
N = int(input())
A = int(input())
B = int(input())

if N == 1:
    print("Hello World")

elif N == 2:
    print(A+B)


### FIXED CODE ###

N = int(input())

if N == 1:
    print("Hello World")

elif N == 2:
    A = int(input())
    B = int(input())
    print(A+B)
n, k = map(int, input().split())
a = set()

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

print(n - len(a))


### FIXED CODE ###

n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

print(n - len(set(a)))
N = int(input())
H = list(map(int, input().split()))
max_count = 0
for i in range(0, N-1):
  tmp_count = 0
  for j in range(i, N-1):
  	if H[j] >= H[j]:
      tmp_count=tmp_counnt

### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
tmp = 0
s = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    tmp += 1
    s = max(s, tmp)
  else:
    tmp = 0
    
print(s)
a,b=map(int,input().split())
s=[]
for i in range(n):
    s.append(input())
s.sort()
print("".join(s))

### FIXED CODE ###

n,l=map(int,input().split())
s=sorted([input() for i in range(n)])
print(*s,sep="")
import sys
input = lambda: sys.stdin.readline().rstrip()

n= int(input())
a=list(input())

v=a.count('1')

ans=[0]*n
A=[0]*n
# n以下の残り回数を記録
for i in range(n):
    x=i
    cnt=0
    while x>0:
        cnt+=1
        r = 0
        for j in range(5):
            if (x>>j)&1:
                r+=1
        x=x%r
    ans[i]=cnt

# 各桁をv＋１で割ったあまり
q = [0]*n
# 各桁をv-1で割ったあまり
r = [0]*n
for i in range(n):
    if a[i]=='1':
        if v!=0:
            q[i] = pow(2, n-i-1) % (v + 1)
        if v!=1:
            r[i] += pow(2, n-i-1) % (v - 1)
qq=sum(q)
rr=sum(r)

for i in range(n):
    if a[i]=='1':
        if v!=1:
            z = rr - pow(2,n-i-1)%(v-1)
            cnt = z % (v - 1)
            A[i] = 1 + ans[cnt]
    else:
        z=qq+pow(2,n-i-1)%(v+1)
        cnt=z%(v+1)
        A[i]=1+ans[cnt]

for i in A:
    print(i)

### FIXED CODE ###

import sys
input = lambda: sys.stdin.readline().rstrip()

n= int(input())
a=list(input())

v=a.count('1')

ans=[0]*n
A=[0]*n
# n以下の残り回数を記録
for i in range(n):
    x=i
    cnt=0
    while x>0:
        cnt+=1
        r = 0
        for j in range(19):
            if (x>>j)&1:
                r+=1
            if x>>j==0:
                break
        x=x%r
    ans[i]=cnt

# 各桁をv＋１で割ったあまり
q = [0]*n
# 各桁をv-1で割ったあまり
r = [0]*n
for i in range(n):
    if a[i]=='1':
        if v!=0:
            q[i] = pow(2, n-i-1,v+1) 
        if v!=1:
            r[i] += pow(2, n-i-1,v-1) 
qq=sum(q)
rr=sum(r)

for i in range(n):
    if a[i]=='1':
        if v!=1:
            z = rr - pow(2,n-i-1,v-1)
            cnt = z % (v - 1)
            A[i] = 1 + ans[cnt]
    else:
        z=qq+pow(2,n-i-1,v+1)
        cnt=z%(v+1)
        A[i]=1+ans[cnt]

for i in A:
    print(i)
a, b = map(int, input().split())

if a % 3 == 0 or b % 3 == 0 or (a*b) % == 0 :
  print("Possible")
else:
  print("Impossible")

### FIXED CODE ###

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

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0 :
  print("Possible")
else:
  print("Impossible")