Harryxun/stf_run huggingface dataset:
import sys
import math

ct= 0
def insertion_sort(a, n, g):
    for j in range(0,n-g):
        v = a[j+g]
        while j >= 0 and a[j] > v:
            a[j+g] = a[j]
            j = j-g
            ct += 1
        a[j+g] = v

n = int(input())
a = list(map(int, sys.stdin.readlines()))
b = 701
g = [x for x in [1,4,10,23,57,132,301,701] if x <= n]
while True:
    b = math.floor(2.25*b)
    if b > n:
        break
    g.append(b)
g = g[::-1]

for i in g:
    insertion_sort(a, n, i)

print(len(g))
print(*g, sep=" ")
print(ct)
print(*a, sep="\n")

### FIXED CODE ###

import sys
import math

ct= 0
def insertion_sort(a, n, g):
    global ct
    for j in range(0,n-g):
        v = a[j+g]
        while j >= 0 and a[j] > v:
            a[j+g] = a[j]
            j = j-g
            ct += 1
        a[j+g] = v

n = int(input())
a = list(map(int, sys.stdin.readlines()))

b = math.floor(2.25*701)
g = [x for x in [1,4,10,23,57,132,301,701] if x <= n]

while b<=n:
    g.append(b)
    b = math.floor(2.25*b)
g = g[::-1]

for i in g:
    insertion_sort(a, n, i)

print(len(g))
print(*g, sep=" ")
print(ct)
print(*a, sep="\n")
MOD = 10**9+7
X, Y = map(int, input().split()))
if (X > Y):
    X, Y = Y, X

if (X+Y)%3 != 0:
    print (0)
    exit()

if (2*X < Y):
    print (0)
    exit()

W = X - ((X+Y)//3)
H = Y - ((X+Y)//3)

mx = 10**6
fact = [1] * (mx+1) # 階乗を格納するリスト
def inv(n): # MODを法とした逆元
    return pow(n, MOD-2, MOD)
for i in range(mx):
    fact[i+1] = fact[i] * (i+1) % MOD # 階乗を計算
ans = (fact[W+H] * inv(fact[W]) * inv(fact[H])) % MOD # comb(W+H,W) = (W+H)!/(W!H!)
print (ans)

### FIXED CODE ###

MOD = 10**9+7
X, Y = sorted(list(map(int, input().split())))

if (X+Y)%3 != 0:
    print (0)
    exit()

if (2*X < Y):
    print (0)
    exit()

W = X - ((X+Y)//3)
H = Y - ((X+Y)//3)

mx = 10**6
fact = [1] * (mx+1) # 階乗を格納するリスト
def inv(n): # MODを法とした逆元
    return pow(n, MOD-2, MOD)
for i in range(mx):
    fact[i+1] = fact[i] * (i+1) % MOD # 階乗を計算
ans = (fact[W+H] * inv(fact[W]) * inv(fact[H])) % MOD # comb(W+H,W) = (W+H)!/(W!H!)
print (ans)
n=int(input())
a=list(map(int,input().split()))
a.sort()
minus=[i for i in a if i<0]
plus=[i for i in a if i>=0]
if len(plus)==0:
    print(a[-1]-a[0]+sum(a[1:n-1]))
    for i in range(n-1):
        if i==n-2:
            print(a[-1],a[n-2])
        else:
            print(a[i],a[i+1])
            a[i+1]=a[i]-a[i+1]
elif len(minus)==0:
    print(a[-1]-a[0]-sum(a[1:-2]))
    print(a[-1],a[0])
    a[-1]=a[-1]-a[0]
    for i in range(1,n-1):
        print(a[-1],a[i])
        a[-1]-=a[i]
else:
    print(a[-1]-a[0]-sum(minus[1:-1])+sum(plus[0:-2]))
    for i in range(len(plus)-1):
        print(a[0],plus[i])
        a[0]-=plus[i]
    for j in range(1,len(minus)):
        print(a[-1],minus[i])
        a[-1]-=minus[i]

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
a.sort()
minus=[i for i in a if i<0]
plus=[i for i in a if i>=0]
if len(minus)==0:
    print(a[-1]-a[0]+sum(a[1:n-1]))
    for i in range(n-1):
        if i==n-2:
            print(a[-1],a[n-2])
        else:
            print(a[i],a[i+1])
            a[i+1]=a[i]-a[i+1]
elif len(plus)==0:
    print(a[-1]-a[0]-sum(a[1:n-1]))
    print(a[-1],a[0])
    a[-1]=a[-1]-a[0]
    for i in range(1,n-1):
        print(a[-1],a[i])
        a[-1]-=a[i]
else:
    print(a[-1]-a[0]-sum(minus[1:])+sum(plus[0:-1]))
    for i in range(len(plus)-1):
        print(minus[0],plus[i])
        minus[0]-=plus[i]
    for i in range(len(minus)):
        print(a[-1],minus[i])
        a[-1]-=minus[i]
num=1000000
prime=[1]*1000000
prime[0]=0
prime[1]=0
i=2
ans=0
while i<1000000:
 if prime[i]==1:
  ans+=1
 if i<1000:
  j=i*i
  while j<1000000:
   prime[j]=0
   j+=i
 prime[i]=ans
 i+=1
while True:
 n=input()
 try:
  print prime[n]
 except:
  break

### FIXED CODE ###

num=1000000
prime=[1]*1000000
prime[0]=0
prime[1]=0
i=2
ans=0
while i<1000000:
 if prime[i]==1:
  ans+=1
 if i<1000:
  j=i*i
  while j<1000000:
   prime[j]=0
   j+=i
 prime[i]=ans
 i+=1
while True:
 try:
  n=input()
  print prime[n]
 except:
  break
n=int(input())
a=[int(j) for j in input().split()]
import numpy as np
dp=np.array([[0]*n for i in range((n//2)+1)])

def f(l,m):
    if l==[]:
        return -10**100
    if m==1:
        return max(l)
    if -(-len(l)//2)<m:
        return -10**100
    return max(f(l[1:],m),l[0]+f(l[2:],m-1))

print(f(a,n//2))

### FIXED CODE ###

n=int(input())
a=[int(j) for j in input().split()]
p=[0]*n
d=[0]*n
for i in range(n):
    p[i]=a[i]+p[i-2]
    if (i&1):
        d[i]=max(p[i-1],a[i]+d[i-2])
    else:
        d[i]=max(d[i-1],a[i]+d[i-2])
print(d[-1])
a,b = map(str,input().split())

if a == "H" and b == "H":
    print("H")
elif a== "H"and b == "D":
    print("D")
elif a == "D" and b == "H":
    print("D")
else;
print("H")

### FIXED CODE ###

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

if a == "H" and b == "H":
    print("H")
elif a== "H"and b == "D":
    print("D")
elif a == "D" and b == "H":
    print("D")
else:
    print("H")
a,b=map(int,input(),split())
x=a+b
if x>=10:
    print('error')
else:
    print(x)

### FIXED CODE ###

a,b=map(int,input().split())
x=a+b
if x>=10:
    print('error')
else:
    print(x)
def divisore(n):
    divisors=[]
    for i in range(1,int(n**0.5)+1):
        if n%i==0:
            divisors.append(i)
            if i!=n//i:
                divisors.append(n//i)
    divisors.sort(reverse=True)
    return divisors

n,m=map(int,input().split())
l=divisore(m)
for i in l:
  if m/n>=i:
  print(i)
  exit()

### FIXED CODE ###

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

n,m=map(int,input().split())
l=divisore(m)
for i in l:
 if m//n>=i:
  print(i)
  exit()
n = int(input())
a = [int(input()) for i in range(n)]
b = [int(input()) for i in range(n)]
c = [int(input()) for i in range(n)]

ans = sum(b)
for i in range(1,n):
    if a[i]-1==a[i-1]:
        ans+=c[i-1]
print(ans)

### FIXED CODE ###

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

m=0
for i in range(n-1):
  if a[i+1]==a[i]+1:
    m=m+c[a[i]-1]

print(sum(b)+m)
x,y = int(input().split())
print(int(x + y/2))

### FIXED CODE ###

x, y = map(int, input().split())
print(int(x + y / 2))
print(2**int(log2(int(input()))))

### FIXED CODE ###

import math
print(2**int(math.log2(int(input()))))
def f(n, memo = dict()):
	if n == 0 or n == 1:
		return 1
	elif n in memo.keys():
		return memo[n]
	else:
		temp = (f(n-1) * n) % int(10e9+7)
		memo[n] = temp
		return temp

n = int(input())
print(f(n))

### FIXED CODE ###

import math
n = int(input())
print(math.factorial(n)%int(10**9+7))
A, B, C = map(int,input().split())
    if B+C-A < 0:
        print('0')
    else:
        print(B+C-A)

### FIXED CODE ###

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

a, b, c = map(int, input().split())
if b + c - a > 0:
    print(b + c - a)
else:
    print(0)
#!/usr/bin/env python

# input
n, m = map(int, input().split())
t = [list(map(int, input().split())) for _ in range(m)]
p = list(map(int, input().split()))
k = [t[i][0] for i in range(m)]
s = [t[i][1:] for i in range(m)]

# calc
# bit full search
ans = 0 
for i in range(2**n):
    tmp = i 
    sw = []
    if i == 0:
        sw = [0] 
    while tmp > 0:
        sw.append(tmp&1)
        tmp = tmp>>1
    while len(sw) < n:
        sw.append(0)

    #print('sw =', sw)
    
    # check whether current sw satisfies the condision.
    ok = True
    # light bulb j
    for j in range(m):
        tmp = 0 
        for a in range(k[j]):
            tmp += sw[a+1]
        if tmp%2 != p[j]%2:
            ok = False
            break
    if ok: 
        # print('sw =', sw)
        ans += 1

print(ans)


### FIXED CODE ###

#!/usr/bin/env python

# input
n, m = map(int, input().split())
t = [list(map(int, input().split())) for _ in range(m)]
p = list(map(int, input().split()))
k = [t[i][0] for i in range(m)]
s = [t[i][1:] for i in range(m)]

# calc
# bit full search
ans = 0 
for i in range(2**n):
    tmp = i 
    sw = []
    if i == 0:
        sw = [0] 
    while tmp > 0:
        sw.append(tmp&1)
        tmp = tmp>>1
    while len(sw) < n:
        sw.append(0)

    #print('sw =', sw)
    
    # check whether current sw satisfies the condision.
    ok = True
    # light bulb j
    for j in range(m):
        tmp = 0 
        for a in range(k[j]):
            tmp += sw[s[j][a]-1]
        if tmp%2 != p[j]:
            ok = False
            break
    if ok: 
        # print('sw =', sw)
        ans += 1

print(ans)
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    H, W = map(int, rl().split())
    s = [list(input()) for _ in range(H)]
    
    dp = [[0] * W for _ in range(H)]
    dp[0][0] = s[0][0] == '#'
    for i in range(1, W):
        dp[0][i] = dp[0][i - 1] + (s[0][i] == '#')
        dp[i][0] = dp[i - 1][0] + (s[i][0] == '#')
    
    for i in range(1, H):
        for j in range(1, W):
            dp[i][j] = min(dp[i - 1][j], dp[i][j - 1]) + (s[i][j] == '#')
    print(dp[-1][-1])


if __name__ == '__main__':
    solve()


### FIXED CODE ###

import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    H, W = map(int, rl().split())
    s = [list(input()) for _ in range(H)]
    
    dp = [[0] * W for _ in range(H)]
    dp[0][0] = s[0][0] == '#'
    for i in range(1, W):
        dp[0][i] = dp[0][i - 1] + (s[0][i - 1] == '.' and s[0][i] == '#')
    for i in range(1, H):
        dp[i][0] = dp[i - 1][0] + (s[i - 1][0] == '.' and s[i][0] == '#')
    
    for i in range(1, H):
        for j in range(1, W):
            dy = s[i - 1][j] == '.' and s[i][j] == '#'
            dx = s[i][j - 1] == '.' and s[i][j] == '#'
            dp[i][j] = min(dp[i - 1][j] + dy, dp[i][j - 1] + dx)
    print(dp[-1][-1])


if __name__ == '__main__':
    solve()
a = set(["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"])
s = input()
for i in range(len(s)):
    a.remove(s[i])
b = list(a).sort()
if b:
    print(s[i]+s[0])
else:
    for i in range(2,27):
        if s[-i] < s[-i+1]:
            break
        if i == 26:
            print(-1)
            exit()
    for j in sorted(s[-i+1:]):
        if j > s[-i]:break
    print(s[:-i]+j)

### FIXED CODE ###

a = set(["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"])
s = input()
if len(s)<26:
    b = list(a-set(s))
    b.sort()
    print(s+b[0])
else:
    for i in range(2,27):
        if s[-i] < s[-i+1]:
            break
        if i == 26:
            print(-1)
            exit()
    for j in sorted(s[-i+1:]):
        if j > s[-i]:break
    print(s[:-i]+j)
n11, n12, n13 = map(int,input().split())
n21, n22, n23 = map(int,input().split())
n31, n32, n33 = map(int,input().split())
lines = [[n11,n12,n13],
         [n21,n22,n23],
         [n31,n32,n33],
         [n11,n21,n31],
         [n12,n22,n32],
         [n13,n23,n33],
         [n11,n22,n33],
         [n13,n22,n31]]
nums = {}
r = input()
for i in range(int(r)):
  nums[int(input())] = 0
flag = False
for l in lines:
  if l[0] in nums:
    if l[1] in nums:
      if l[2] in nums:
        flag = True
if flag:
  print("No")
else:
  print("Yes")


### FIXED CODE ###

import math
s = input()
s = int(s)
s = s/2
s = math.ceil(s)
print(s)
m = 0
if len(ss) <= len(ts):
  m = len(ss)
  l = 0
  for j in range(m):
    if alph.index(ss[j]) < alph.index(ts[j]):
      print("Yes")
      break
    elif alph.index(ss[j]) == alph.index(ts[j]) :
      if j == m -1:
        print("Yes")
      else:
        pass
    else:
      print("No")
      break
elif len(ss) == len(ts):
  m = len(ss)
  l = 0
  for j in range(m):
    if alph.index(ss[j]) < alph.index(ts[j]):
      print("Yes")
      break
    elif alph.index(ss[j]) == alph.index(ts[j]) :
      if j == m -1:
        print("No")
      else:
        pass
    else:
      print("No")
      break
else:
  m = len(ts)
  l = 0
  for j in range(m):
    if alph.index(ss[j]) < alph.index(ts[j]):
      print("Yes")
      break
    elif alph.index(ss[j]) == alph.index(ts[j]) :
      if j == m - 1:
        print("No")
    else:
      print("No")
      break

### FIXED CODE ###

s = input()
t = input()
sl = list(s)
tl = list(t)
sl_asc = sorted(sl)
tl_desc = sorted(tl, reverse=True)
s2 = ''.join(sl_asc)
t2 = ''.join(tl_desc)
if s2 < t2:
  print("Yes")
else:
  print("No")
a, b = map(int, input().split())


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")
n=int(input())
a=list(map(int,input().split()))
b=a
k=1
for i,j in enumerate(a,1):
  b[j]=i
print(*b)


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i,j in enumerate(a,1):
  b[j-1]=i
print(*b)
import numpy as np

def main():
	A, B, X = [int(x) for x in input().split()]

	if (A * A * B) / 2.0 >= X:
		y = (2 * X) / (A * B)
		R = np.arctan(y / B)
		print(90 - np.rad2deg(R))
	else:
		_x = (A * A * B) - X
		y = (2 * _x) / (A * A)
		R = np.arctan(A / y)
		print(90 - np.rad2deg(R))
	
if __name__ == "__main__":
	main()


### FIXED CODE ###

import numpy as np

def main():
	A, B, X = [int(x) for x in input().split()]

	if (A * A * B) / 2.0 >= X:
		y = (2 * X) / (A * B)
		R = np.arctan(y / B)
		print(90 - np.rad2deg(R))
	else:
		_x = (A * A * B) - X
		y = (2 * _x) / (A * A)
		try:
			R = np.arctan(A / y)
			print(90 - np.rad2deg(R))
		except:
			print(0.000000000)
		
	
if __name__ == "__main__":
	main()
a, b = input().split
print(a??????b + ' ' + 2??????(a+b))

### FIXED CODE ###

a, b = input().split( )
a = int(a)
b = int(b)
print(str(a*b) + ' ' + str(2*(a+b)))
import math

def lcm(a,b):
  return a//math.gcd(a,b)*b

n = int(input())
v = [int(x) for x in input().split()]
running = 1
for x in v:
  running = lcm(running,x)
print(x-1)

### FIXED CODE ###

n = int(input())
v = [int(x) for x in input().split()]
running = 0
for x in v:
  running += x-1
print(running)
a, b = map(int, input().split())
if a == b:
	print("H")
else:
	print("D")

### FIXED CODE ###

a, b = map(str, input().split())
if a == b:
	print("H")
else:
	print("D")
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n = I()
cnt = [0] * 10001
for x in range(1, r_n):
    for y in range(1, r_n):
        for z in range(1, r_n):
            v = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if v <= n:
                cnt[v] += 1

for i in range(1, n + 1):
    print(cnt[i])


### FIXED CODE ###

import math
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


def f(m):
    res = 0
    r_m = math.sqrt(m)
    for i in range(1, int(r_m) + 1):
        for j in range(1, int(r_m) + 1):
            for k in range(1, int(r_m) + 1):
                if i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i == m:
                    print(f'{(m, i, j, k)=}')
                    res += 1
    return res


n = I()
cnt = [0] * 10001
r_n = int(math.sqrt(n)) + 1
for x in range(1, r_n):
    for y in range(1, r_n):
        for z in range(1, r_n):
            v = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if v <= n:
                cnt[v] += 1

for i in range(1, n + 1):
    print(cnt[i])
from collections import deque
H,W=map(int,input().split())
S=[input() for i in range(H)]
checked=[[0 for i in range(W)] for m in range(H)]

count=0
count2=0
visited=set([h1*400+w1])
for h1 in range(H):
    for w1 in range(W):
        if S[h1][w1]=="#" and checked[h1][w1]==0:
            checked[h1][w1]=1
            stack=deque([[h1,w1,"#"]])
            kuro=1
            siro=0
            count2+=1

            while stack:
                h,w,iro=stack.popleft()
                for y,x in [[-1,0],[1,0],[0,1],[0,-1]]:
                    Y,X=y+h,x+w
                    visitednum=Y*400+X
                    if 0<=Y<H and 0<=X<W and not visitednum in visited:
                        if iro=="#" and S[Y][X]==".":
                            siro+=1
                            visited.add(visitednum)
                            stack.append([Y,X,"."])
                        elif iro=="." and S[Y][X]=="#" and not visitednum in visited:
                            kuro+=1
                            checked[Y][X]=1
                            visited.add(visitednum)
                            stack.append([Y,X,"#"])
            count+=kuro*siro
print(count)


### FIXED CODE ###

from collections import deque
H,W=map(int,input().split())
S=[input() for i in range(H)]
checked=[[0 for i in range(W)] for m in range(H)]

count=0
count2=0
for h1 in range(H):
    for w1 in range(W):
        if S[h1][w1]=="#" and checked[h1][w1]==0:
            checked[h1][w1]=1
            stack=deque([[h1,w1,"#"]])
            kuro=1
            siro=0
            count2+=1
            visited=set([h1*400+w1])
            while stack:
                h,w,iro=stack.popleft()
                for y,x in [[-1,0],[1,0],[0,1],[0,-1]]:
                    Y,X=y+h,x+w
                    visitednum=Y*400+X
                    if 0<=Y<H and 0<=X<W and not visitednum in visited:
                        if iro=="#" and S[Y][X]==".":
                            siro+=1
                            visited.add(visitednum)
                            stack.append([Y,X,"."])
                        elif iro=="." and S[Y][X]=="#" and not visitednum in visited:
                            kuro+=1
                            checked[Y][X]=1
                            visited.add(visitednum)
                            stack.append([Y,X,"#"])
            count+=kuro*siro
print(count)
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

x_oni = A + V * T
x_kodomo = B + W * T

if x_oni >= X_kodomo:
  print('YES')
else:
  print('NO')


### FIXED CODE ###

A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

x = A + V * T
y = B + W * T

z = A - V * T
w = B - W * T

if A < B:
  if x >= y:
    print('YES')
  else:
    print('NO')
else:
  if z <= w:
    print('YES')
  else:
    print('NO')
#include <iostream>
#include <cstdio>
using namespace std;

int main(){
  int a, b, c, d;
  cin.tie(0);
  ios::sync_with_stdio(false);

  cin >> a >> b >> c >> d;
  cout << min(a,b) + min(c,d) << endl;
  return 0;
}

### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
D = int(input())
train = min(A, B)
bus = min(C, D)
print(train + bus)
print(int('x')**3)

### FIXED CODE ###

x = int(input())
print(x**3)
b = input()
if b == A:
  print("T")
elif b == C:
  print("G")
elif b == G:
  print("C")
else b == T:
  print("A")

### FIXED CODE ###

b = input()

if b == "A":
  print("T")
elif b == "C":
  print("G")
elif b == "G":
  print("C")
else:
  print("A")
import numpy as np
n,m,q=map(int,input().split())
book=[[0]*(n+1) for _ in range(n+1)]
for _ in range(m):
    r,l=map(int,input().split())
    book[r][l] +=1

for i in range(n+1):
    for j in range(n+1):
        book[i][j] +=book[i][j-1]

for i in range(n+1):
    for j in range(n+1):
        book[i][j] +=book[i-1][j]

#print(np.array(book))

for x,y in [map(int,input().split()) for i in range(q)]:
    print(book[y][y]-book[y][x-1]-book[x-1][y]+book[x][x])

### FIXED CODE ###

import numpy as np
N, M, Q = map(int, input().split())

#input
lst = [[0] * (N + 1) for _ in range(N + 1)]
for _ in range(M):
    L, R = map(int, input().split())
    lst[R][L] += 1

lst = np.array(lst)
# print (lst)

#2次元累積和
for i in range(1, N + 1):
    lst[:,i] += lst[:, i - 1]
for j in range(1, N + 1):
    lst[j,:] += lst[j - 1, :]


#output
for _ in range(Q):
    p, q = map(int, input().split())
    print (lst[q, q] - lst[p-1, q] - lst[q, p-1] + lst[p-1, p-1])

# print (lst)
def check_prime(k):
    '''
    素数の時1、合成数の時0を返す
    '''
    if k == 1:return 0
    num = int(k ** 0.5 // 1)
    for i in range(2, num + 1):
        if k % i == 0:return 0
    return 1

n = int(input())
prime = []
for i in range(1, 55556):
    if check_prime(i):
        prime.append(i)

rec = [2]
cnt = 0
for i in range(n - 1):

    while True:
        if prime[cnt] < 2 * rec[-1]:
            cnt += 1
        else:
            rec.append(prime[cnt])
            cnt += 1
            break
print(*rec)

### FIXED CODE ###

def check_prime(k):
    '''
    素数の時1、合成数の時0を返す
    '''
    if k == 1:return 0
    num = int(k ** 0.5 // 1)
    for i in range(2, num + 1):
        if k % i == 0:return 0
    return 1

n = int(input())
prime = []

for i in range(2, 55556):
    if check_prime(i):
        prime.append(i)

rec = [2]
ind = 1
for i in range(n - 1):
    while True:
        if prime[ind] % 5 == 1:
            rec.append(prime[ind])
            ind += 1
            break
        ind += 1

print(*rec)
s=input()


con=False

ans=0
for i in range(3):
  if(s[i]=="R" and con):
    ans+=1
  elif(s[i]=="R" and not(con)):
    ans=1
    con=True
  else:
    con=False
      
print(ans)

### FIXED CODE ###

n=int(input())

print('Yes' if n>=30 else "No")
import math
h, w = map(int,input().split())
if h % 2 ==1 and w % 2 == 1:
    print((h*w+1)/2)
else:
# print(math.ceil(h*w/2))
print(h*w/2)

### FIXED CODE ###

import math
h, w = map(float, input().split())
if h == 1 or w == 1:
    print(1)
else:
    print(math.ceil(h*w/2))
n = int(input())
a = [0]*(1000000001)
for _ in [0]*n:
  k = int(input())
  a[k] = 1-a[k]
print(sum(a))

### FIXED CODE ###

n = int(input())
d = {}
for _ in [0]*n:
  k = int(input())
  if k in d:
    d[k] = 1-d[k]
  else:
    d[k]=1
print(sum(d.values()))
u=0
u=int(input())
A = list(map(int,input().split()))
n = len(A)
prr = 0
for i in range(n):
    for j in range(i + 1, n):
        prr = prr + A[i] * A[j]
print(prr)











### FIXED CODE ###

d,t,s=list(map(int,input().split()))
if d/s<=t:
    print("Yes")
elif d==0 or t==0 or s==0:
    print("Yes")
else:
    print("No")
import math
n=int(input())
ans = len(str(n))
for a in range(1,int(math.sqrt(n)+1)):
    if n % a == 0 and ans > max(len(str(a)),len(str(int(n / a))))
        ans = max(len(str(a)),len(str(int(n / a))))
print(ans)

### FIXED CODE ###

import math
n=int(input())
k = math.floor(math.sqrt(n))
for a in range(k+1,0,-1):
    if n % a == 0:
        print(max(len(str(a)),len(str(n//a))))
        break
s = input()
a = []
for i in range(len(str(s))-2):
  a.extend(abs(s[i]*100+s[i+1]*10+s[i+2]-753))
print(min(a))

### FIXED CODE ###

s = input()
a = []
for i in range(len(s)-2):
  a.append(abs(int(s[i])*100+int(s[i+1])*10+int(s[i+2])-753))
print(min(a))
n, x, t = map(int, input().split())

import math

print(t*math.ceil(int(input())/x))

### FIXED CODE ###

n, x, t = map(int, input().split())

import math

print(t*math.ceil(n/x))