Harryxun/stf_run huggingface dataset:
import numpy as np
N = int(input())
A = np.array([int(x) for x in input().split()])
mi= np.min(A)
ma= np.max(A)
mai = np.where(A==ma)
mii = np.where(A==mi)
ans = []
if ma<=0 and mi<=0:
  for i in range(N,1,-1):
    ans.append((i,i-1))
  print(len(ans))
  for i in range(len(ans)):
    print(*ans[i])
  exit()
if ma>=0 and mi>=0:
  for i in range(1,N):
    ans.append((i,i+1))
  print(len(ans))
  for i in range(len(ans)):
    print(*ans[i])
  exit()

if abs(mi)<=abs(ma):
  ans= [(int(mai[0])+1,i) for i in range(1,N+1)]
  for i in range(1,N):
    ans.append((i,i+1))
  print(len(ans))
  for i in range(len(ans)):
    print(*ans[i])
  exit()
else:
  ans= [(int(mii[0])+1,i) for i in range(1,N+1)]
  for i in range(N,1,-1):
    ans.append((i,i-1))
  print(len(ans))
  for i in range(len(ans)):
    print(*ans[i])
  exit()

### FIXED CODE ###

import numpy as np
N = int(input())
A = np.array([int(x) for x in input().split()])
mi= np.min(A)
ma= np.max(A)
mai = np.where(A==ma)
mii = np.where(A==mi)
ans = []
if ma<=0 and mi<=0:
  for i in range(N,1,-1):
    ans.append((i,i-1))
  print(len(ans))
  for i in range(len(ans)):
    print(*ans[i])
  exit()
if ma>=0 and mi>=0:
  for i in range(1,N):
    ans.append((i,i+1))
  print(len(ans))
  for i in range(len(ans)):
    print(*ans[i])
  exit()

if abs(mi)<=abs(ma):
  ans= [(int(mai[0][0])+1,i) for i in range(1,N+1)]
  for i in range(1,N):
    ans.append((i,i+1))
  print(len(ans))
  for i in range(len(ans)):
    print(*ans[i])
  exit()
else:
  ans= [(int(mii[0][0])+1,i) for i in range(1,N+1)]
  for i in range(N,1,-1):
    ans.append((i,i-1))
  print(len(ans))
  for i in range(len(ans)):
    print(*ans[i])
  exit()
import math

def getDist(a,b,c,d):
  return abs(a-c) + abs(b-d)
def findSmallest(student, checkPoints):
  [a,b] = student
  shortest = math.inf
  index = 1
  for checkPoint in checkPoints:
    [c,d] = checkPoint
    dist = getDist(a,b,c,d)
    if dist < shortest:
      shortest = dist
      indexAns = index
    index += 1
  return indexAns

n,m=[int(x) for x in input().split()]
students = []
for x in range(n):
  students.append([int(x) for x in input().split()])
checkPoints = []
for x in range(m):
  checkPoints.append([int(x) for x in input().split()])

for student in students:
  print(findSmallest(student, checkPoints[:]))
  

  """
1 2
2 0
-1 0
1 0
  """

### FIXED CODE ###

def getDist(a,b,c,d):
  return abs(a-c) + abs(b-d)
def findSmallest(student, checkPoints):
  [a,b] = student
  shortest = 99999999999
  index = 1
  for checkPoint in checkPoints:
    [c,d] = checkPoint
    dist = getDist(a,b,c,d)
    if dist < shortest:
      shortest = dist
      indexAns = index
    index += 1
  return indexAns

n,m=[int(x) for x in input().split()]
students = []
for x in range(n):
  students.append([int(x) for x in input().split()])
checkPoints = []
for x in range(m):
  checkPoints.append([int(x) for x in input().split()])

for student in students:
  print(findSmallest(student, checkPoints[:]))
S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,len(alp)):
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  if S == T:
    print("Yes")
    exit()
print("No")

### FIXED CODE ###

S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,min(len(S),len(alp)*2)):
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  else:
    pass
  if S == T:
    print("Yes")
    exit()
print("No")
while True:
    (H,W) = [int(i) for i in input().split()]
    if H==W==0:
        break
    for i in range(H):
        for j in range(W):
            if (i+j)%2==0: print('#',end="")
            else: p0rint('.',end="")
        print('')
    print('')


### FIXED CODE ###

while True:
    (H,W) = [int(i) for i in input().split()]
    if H==W==0:
        break
    for i in range(H):
        for j in range(W):
            if (i+j)%2==0: print('#',end="")
            else: print('.',end="")
        print('')
    print('')
_input = [i for i in open(0).read().split('\n') if i]
n, k = [int(i) for i in _input[0].split()]
edge = tuple([tuple([int(p) for p in i.split()]) for i in _input[1:n]])

factorial = [0] * (k + 1)
inverse = [0] * (k + 1)
MOD = 1000000007

# Ref: http://keita-matsushita.hatenablog.com/entry/2016/12/05/175024
def mod_pow1(n, k, mod):
    a = 1
    while k:
        if (k & 1) == 1:
            a = (a * n) % mod
        n = (n * n) % mod
        k >>= 1
    return a

# Ref: https://www.smartbowwow.com/2018/10/mod1097.html
def mod_pow2(n, k, mod):
    if k == 0:
        return 1
    if k % 2 == 0:
        a = mod_pow2(n, k // 2, mod)
        return (a * a) % mod
    else:
        return (n * mod_pow2(n, k - 1, mod)) % mod

mod_pow = pow

def mod_factorial_inverse(k, mod):
    factorial[0] = 1
    inverse[0] = 1

    # Ref: http://keita-matsushita.hatenablog.com/entry/2016/12/05/184011
    for i in range(1, k + 1):
        factorial[i] = ((i * factorial[i - 1]) % mod) # factrial[i]
        inverse[i] = mod_pow(factorial[i], mod - 2, mod) # inverse[i]

if not edge:
    print(k)
else:
    all_edge = tuple([[] for _ in range(n + 1)])
    for e in edge:
        all_edge[e[0]].append(e[1])
        all_edge[e[1]].append(e[0])

    if [v for v in all_edge if len(v) >= k]:
        print(0)
    else:
        mod_factorial_inverse(k, MOD)
        


### FIXED CODE ###

_input = [i for i in open(0).read().split('\n') if i]
n, a, b = [int(i) for i in _input[0].split()]
print(min(n * a, b))
import sys
#sys.setrecursionlimit(200000)
input = sys.stdin.readline
n,m= map(int,input().split())
g = [[]for i in range(n)]
for i in range(m):
        a,b = map(int,input().split())
        a-=1;b-=1
        g[a].append(b)
        g[b].append(a)
kyo = [1<<50]*n
def dfs(x,y,z):
        for i in g[x]:
                if i == y: continue
                if kyo[i] > z+1:
                        kyo[i] = z+1
                        dfs(i,x,z+1)
kyo[0] = 0
dfs(0,0,0)
ki = 0
gu = 0
mita = set()
for i in kyo:
        if i in mita:
                print(n*(n-1)//2-m)
                exit()
        mita.add(i)
        if i %2 == 0:
                gu += 1
        else:
                ki += 1
print(gu*ki-m)

### FIXED CODE ###

import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
n,m= map(int,input().split())
g = [[]for i in range(n)]
for i in range(m):
        a,b = map(int,input().split())
        a-=1;b-=1
        g[a].append(b)
        g[b].append(a)
kyo = [-1]*n
def dfs(x,y,z):
        for i in g[x]:
                if i == y: continue
                if kyo[i] == -1:
                        kyo[i] = (z+1)%2
                        dfs(i,x,z+1)
                else:
                        if kyo[i] !=  (z+1)%2:
                                print(n*(n-1)//2-m)
                                exit()
                
kyo[0] = 0
dfs(0,0,0)
ki = 0
gu = 0
for i in kyo:
        if i %2 == 0:
                gu += 1
        else:
                ki += 1
print(gu*ki-m)
from sys import stdin
# read data for n sequences.
n = stdin.readline().rstrip()
a = int(n[0])
b = int(n[2])
c = int(n[4])
#data = [int(stdin.readline().rstrip()) for _ in range(n)]

out = int(a * b /2)

print(out)

### FIXED CODE ###

from sys import stdin


############################################


# read data for n sequences.
n = stdin.readline().split()
a = int(n[0])
b = int(n[1])
c = int(n[2])
#data = [int(stdin.readline().rstrip()) for _ in range(n)]

out = int(a * b /2)

print(out)
import collections
n = int(input())
alist = list(int,input().split())
adic = collections.Counter(alist)
for k,v in adic.items():
  if v == 1:
    del(adic[k])
sort_adic = sorted(adic.items(), reverse = True, key = lamda x:x[1])
li = list(sort_adic.items())
print(li[0][1]*li[1][1])

### FIXED CODE ###

import collections
n = int(input())
alist = list(map(int,input().split()))
adic = collections.Counter(alist)
A = [0,0]
for i in adic:
  if adic[i] > 1:
    A.append(i)
  if adic[i] > 3:
    A.append(i)
sortedA = sorted(A)
print(sortedA[-1]*sortedA[-2])
n = int(input())

num_list = [ int(v) for v in input().split() ]

a_sum, b_sum = 0, 0

for i in range(n):
  if i % 2 == 0:
    a_sum += num_list[i]
  else:
    b_sum += num_list[i]

print(a-b)

### FIXED CODE ###

n = int(input())

num_list = sorted([ int(v) for v in input().split() ])

a_sum, b_sum = 0, 0

for i in range(n):
  if i % 2 == 0:
    a_sum += num_list[i]
  else:
    b_sum += num_list[i]

print(abs(a_sum-b_sum))
n = int(input())
c = list(map(int, input().split())) 
 
n_pos = 0
max_c = 0
for i in c:
  if (i>=max_c):
  	n_pos += 1
    max_c = i
  else:
    pass
print(n_pos)

### FIXED CODE ###

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

n_pos = 0
max_c = 0
for i in c:
    if i>=max_c:
        n_pos += 1
        max_c = i
    else:
        pass
print(n_pos)
mod=10**9+7
s=input()

b=int(s.replace("?","0"))%13
if b<=5:
    cal=5-b
else:
    cal=18-b

p=[[i*j%13 for i in range(10)] for j in range(13)]
rev=s[::-1]
d={i:0 for i in range(13)}
num=rev.find("?")
tmp=10**num%13
for i in p[tmp]:
    d[i]+=1

for i,v in enumerate(rev[num+1:]):
    #print(i+num+1)
    if v=="?":
        tmp=10**(i+num+1)%13
        t_d={i:0 for i in range(13)}
        #print("i,tmp:",i+num+1,",",tmp)
        for k in range(0,13):
            for j in range(0,10):
                t_d[(p[tmp][j]+k)%13]+=d[k]
            #print(t_d.values())
        for j in range(13):
            d[j]=t_d[j]
        #print(t_d)
#print(d)
print(d[cal]%mod)
        



### FIXED CODE ###

#%%time
mod=10**9+7
s=input()


#p=[[i*j%13 for i in range(10)] for j in range(13)]
rev=reversed(s)
d=[0 for i in range(13)]
d[0]=1
keep=[0 for _ in range(13)]
mul=1
cal=0
for v in rev:
    #print(i+num+1)
    if v=="?":
        t_d=[0 for _ in range(13)]
        #print("i,tmp:",i+num+1,",",tmp)
        for k in range(0,13):
            for j in range(0,10):
                t_d[(mul*j+k)%13]+=d[k]
            t_d[k]%=mod
        d=t_d
    else:
        cal+=mul*int(v)%13
    mul*=10
    mul%=13
        #print(t_d)
cal%=13
if cal<=5:
    cal=5-cal
else:
    cal=18-cal
print(d[cal]%mod)
#print(d)
#h=d
#print([i%mod for i in h])
N = int(input())

if N <= 104 and N >= 1:
  print(0)
elif N >= 105:
  print(1)
elif N >= 135:
  print(2)
elif N >= 145:
  print(3)
elif N >= 165:
  print(4)
elif N >= 189:
  print(5)
elif N >= 195:
  print(6)

### FIXED CODE ###

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

print((A - 1) * (B - 1))
a,b,c,d = map(int,input().split())
for i in range(10**2):
  c -= b
  if c <= 0:
    print("Yes")
    break
  a -= d
  if a <= 0:
    print("No")
    break


### FIXED CODE ###

a,b = map(int,input().split())
if b>=a:
    print("unsafe")
else:
    print("safe")
i = 1
while True:
     x = int(input())
     print('Case {} : {}'.format(i, x))
     i += 1

### FIXED CODE ###

i = 1
while True:
     x = int(input())
     if x == 0: break
     print('Case {}: {}'.format(i, x))
     i += 1
n, k = map(int, input().split())
l = list(map(int, input().split()))
m = max(a)
def hcf(x, y): 
    while(y): 
        x, y = y, x % y 
    return x 
num1=l[0] 
num2=l[1] 
gcd=hcf(num1,num2) 
for i in range(2,len(l)): 
    gcd=hcf(gcd,l[i])
if k%gcd == 0 and k<=m:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

### FIXED CODE ###

import math
from functools import reduce
n, k = list(map(int, input().split()))
A = list(map(int, input().split()))
def hcf(l):
    return reduce(math.gcd, l)
gcd = hcf(A)
m = max(A)
if k%gcd == 0 and k<=m:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
def mapt(fn, *args):
    return list(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))

def main():
    N, X = Input()
    if N == 1:
        print(abs(N-X))
        exit()
        
    x = Input()
    x.append(X)
    x.sort()
    data = [abs(x[i] - x[i+1]) for i in range(N)]

    ans = data[0]
    for i in range(1, N):
        ans = gcd(data[i], ans)
    print(ans)



main()

### FIXED CODE ###

def gcd(a, b):
    """最大公約数"""
    if b == 0: return a
    return gcd(b, a % b)
  

def mapt(fn, *args):
    return list(map(fn, *args))
 
 
def Input():
    return mapt(int, input().split(" "))
 
def main():
    N, X = Input()
    x = Input()
 
    if N == 1:
        print(abs(x[0] - X))
        exit()
 
    x.append(X)
    x.sort()
    data = [abs(x[i] - x[i+1]) for i in range(N)]
 
    ans = data[0]
    for i in range(1, N):
        ans = gcd(data[i], ans)
    print(ans)
 
 
 
main()
S = input()
K = int(input())
key = 1
i = 0
while True:
    if int(S[i]) != 1:
        print(S[i])
        key = 1
        break
    i += 1

if key == 0:
    print(S[0])


### FIXED CODE ###

S = input()
K = int(input())
key = 0
i = 0
while True:
    if i >= K:
        break
    if i >= len(S):
        break
    if int(S[i]) != 1:
        print(S[i])
        key = 1
        break
    i += 1

if key == 0:
    print(S[0])
n,p=map(int,input().split())
if n%(2p+1)==0:
    print(n//(2p+1))
else:
    print(n//(2p+1)+1)

### FIXED CODE ###

n,p=map(int,input().split())
if n%(2*p+1)==0:
    print(n//(2*p+1))
else:
    print(n//(2*p+1)+1)
W, H, x, y = map(int, input().split())
S = W * H / 2

if x == W // 2 and y == H //2:
    flg = 1

print("{} {}".format(S, flg))

### FIXED CODE ###

#C
W, H, x, y = map(int, input().split())
S = W*H/2
ans = '0'
if W/2 == x and H/2 == y:
    ans = '1'

print("{} {}".format(S, ans))
a,b = map(int,input().split())
if a+b =< 23:
    print(a+b)
else:
    print(a+b-24)


### FIXED CODE ###

a,b = map(int,input().split())
if a+b <= 23:
    print(a+b)
else:
    print(a+b-24)
N,M,C=map(int, input().split())
B=list(map(int, input().split()))
A=[list(map(int, input().split())) for n in range(N)]

def Sof(a):
  d=C
  for m in range(M):
    d+=a[m]*b[m]
  return d > 0

co=0
for i in range(N):
  if(Sof(A[i])):
    co+=1

print(co)

### FIXED CODE ###

N,M,C=map(int, input().split())
B=list(map(int, input().split()))
A=[list(map(int, input().split())) for n in range(N)]

def Sof(a):
  d=C
  for m in range(M):
    d+=a[m]*B[m]
  return d > 0

co=0
for i in range(N):
  if(Sof(A[i])):
    co+=1

print(co)
x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))
p.sort(reverse = True)
q.sort(reverse = True)
r.sort(reverse = True)
pp = p[:x]
qq = q[:y]
rr = r[:(x+y)]
ppqq = pp + qq
ppqq.sort()
for i in range(len(ppqq)):
  if ppqq[i] < rr[0]:
    ppqq[i] = rr[0]
    del rr[0]
print(sum(ppqq))

### FIXED CODE ###

x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))
p.sort(reverse = True)
q.sort(reverse = True)
r.sort(reverse = True)
pp = p[:x]
qq = q[:y]
if x+y <= c:
  rr = r[:(x+y)]
else:
  rr = r
ppqqrr = pp + qq + rr
ppqqrr.sort(reverse = True)
print(sum(ppqqrr[:x+y]))
N, D = map(int, input().split())
X = list(map(int, input().split()))
count = 0
for i in range(N - 1):
    for j in range(i + 1, N):
        r = 0
        for k in range(D):
            r += (X[i][k] - X[j][k]) ** 2
        if r ** 0.5 % 1 == 0:
            count += 1
print(count)


### FIXED CODE ###

N, D = map(int, input().split())
X = [list(map(int, input().split())) for _ in range(N)]
count = 0
for i in range(N - 1):
    for j in range(i + 1, N):
        r = 0
        for k in range(D):
            r += (X[i][k] - X[j][k]) ** 2
        if r ** 0.5 % 1 == 0:
            count += 1
print(count)
a,b,c=map(int,input().split())

f=0

if b%c==0 and a%c==0:
    f+=1
if a==0 and b>0:
    f+=1

print(b//c-a//c+f)a,b,c=map(int,input().split())

f=0

if b%c==0 and a%c==0:
    f=1

print(b//c-a//c+f)

### FIXED CODE ###

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

f=0

if b%c==0 and a%c==0:
    f+=1

if a==0 and b==0:
    print(1)
elif a==0:
    print(b//c+1)
else:
    print(b//c-(a-1)//c)
from collections import Counter

from operator import mul
from functools import reduce
def cmb(n,r):
	if n < r:return 0
	if r == 0 or n-r == 0:return 1
	r = min(n-r,r)
	u = reduce(mul, range(n, n-r, -1))
	d = reduce(mul, range(1,r+1))
	return u//d

n,a,*x = map(int,open(0).read().split())
dp = [[0]*(n*max(x)+1)for _ in range(n+1)]
dp[0][0] = 1
lim1 = lim2 = 1
for k,v in Counter(x).items():
	for i in range(1,v+1):
		c = cmb(v,i)
		for j in range(lim1)[::-1]:
			for s in range(lim2)[::-1]:
				dp[j+i][s+k*i] += dp[j][s]*c
	lim1 += v
	lim2 += k*v
cnt = 0
for i in range(1,n+1):
	cnt += dp[i][i*a]
print(cnt)

### FIXED CODE ###

n,*x=map(int,open(0).read().split())
y=[x[0]-i for i in x]
m=n*max(x)
dp=[[0]*(m*2+1) for _ in range(n+1)]
dp[0][0]=1
for i in range(1,n+1):
	for s in range(-m,m):
		dp[i][s]=dp[i-1][s]+dp[i-1][s-y[i]]
print(dp[n][0]-1)
S = input()
s_len = len(S)
ans = [0 for _ in range(s_len)]

def L_checker(n):
    for i in range(n+1,s_len):
        if S[i]=='R':
            return i
    return s_len

def check(n, r_count):
    if S[n]=='R':
        check(n+1, r_count+1)
    else:
        next_r = L_checker(n)
        total = r_count+next_r-n
        if (total)%2==0:
            ans[n-1]=int((total)/2)
            ans[n]=int((total)/2)
        elif r_count%2==1:
            ans[n-1]=int((total)//2)+1
            ans[n]=int((total)//2)
        else:
            ans[n-1]=int((total)//2)
            ans[n]=int((total)//2)+1
        if next_r == s_len:
            print(*ans)
            exit(0)
        check(next_r,0)

check(0,0)

### FIXED CODE ###

S = str(input())
s_len = len(S)
ans = [0 for _ in range(s_len)]
r_count = 0
l_count = 0
before = 0
switch = 'R'


for i in range(s_len):
    if S[i]==switch:
        if switch == 'R':
            r_count += 1
        else:
            l_count += 1
    else:
        if switch == 'L':
            switch = 'R'
            if (r_count+l_count)%2 == 0:
                ans[before] = (r_count+l_count)//2
                ans[before-1] = (r_count+l_count)//2
            elif r_count%2 == 0:
                ans[before] = (r_count+l_count)//2+1
                ans[before-1] = (r_count+l_count)//2
            else:
                ans[before] = (r_count+l_count)//2
                ans[before-1] = (r_count+l_count)//2+1
            r_count = 1
            l_count = 0
        else:
            switch = 'L'
            before = i
            l_count = 1


if (r_count+l_count)%2 == 0:
    ans[before] = (r_count+l_count)//2
    ans[before-1] = (r_count+l_count)//2
elif r_count%2 == 0:
    ans[before] = (r_count+l_count)//2+1
    ans[before-1] = (r_count+l_count)//2
else:
    ans[before] = (r_count+l_count)//2
    ans[before-1] = (r_count+l_count)//2+1

print(*ans)
n = int(input())
nums = list(map(int, input().split()))

nm_list = [(bin(x)[2:][::-1] + "0" * 20) for x in nums]
lmax = len(nm_list)
accum = [[0] for i in range(21)] #[0]が下位ビット

for i,b in enumerate(nm_list[0][:21]):
    print(accum)
    accum[i][0] += int(b)


for nm in nm_list[1:]:
    for i, b in enumerate(nm[:21]):
        print(i)
        accum[i].append(accum[i][-1] + int(b))

def syakutori():
    ans = 0
    bits = [0]*21
    r = 0
    l = 0
    flag = True
    #尺取り法をする
    while(r < lmax):
        if flag:
            #rを伸ばす
            flag = max([accum[i][r] - accum[i][l] for i in range(21)]) <= 1
            print("a", l, r, flag)
            r += 1
            if flag:
                ans += (r -l)

        else:
            #lを縮める
            flag = max([accum[i][r] - accum[i][l] for i in range(21)]) <= 1
            print("a", l, r, flag)
            l += 1
            if flag:
                ans += (r - l)

    #後処理をする
    while(not flag):
        flag = max([accum[i][r] - accum[i][l] for i in range(21)]) <= 1
        l += 1
        if flag:
            ans += (r - l)

    return ans


print(syakutori())


### FIXED CODE ###

import sys
import math
import copy
from heapq import heappush, heappop, heapify
from functools import cmp_to_key
from bisect import bisect_left, bisect_right
from collections import defaultdict, deque, Counter
# sys.setrecursionlimit(1000000)

# input aliases
input = sys.stdin.readline
getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = float("inf")
MOD = 10**9 + 7
divide = lambda x: pow(x, MOD-2, MOD)

def solve():
    n = getN()
    lis = getList()
    xo, su = 0, 0
    ans = 0
    l, r = 0, 0
    forward = True
    while True:
        # print(l, r, ans, xo, su)
        if r == n:
            print(ans)
            return
        if forward:
            xo = xo^lis[r]
            su += lis[r]
            if xo == su:

                ans += r - l + 1
                r += 1
            else:
                forward = False
        else:
            xo = xo^lis[l]
            su -= lis[l]
            if xo == su:
                forward = True
                ans += r - l
                r += 1
                l += 1
            else:
                l += 1

def main():
    n = getN()
    for _ in range(n):
        solve()

    return
if __name__ == "__main__":
    # main()
    solve()
#!/usr/bin/env python3
import sys
import numpy as np

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(N: int, K: int, A: "List[int]"):
    score = 1
    for i in range(K):
        score *= A[i]

    prev_score = score
    for i in range(N-K):
        score //= A[i]
        score *= A[i+K]
        if score>prev_score:
            print(YES)
        else:
            print(NO)
        prev_score = score
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, K, A)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(N: int, K: int, A: "List[int]"):
    for i in range(N-K):
        if A[i]<A[i+K]:
            print(YES)
        else:
            print(NO)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, K, A)

if __name__ == '__main__':
    main()
import math
A,B,H,M = map(int, input().split())
C = (H * 30 + M * 0.5) - (M * 6)
Radians = math.radians(C)
COS= math.cos(Radians)
ans = (A**2) + (B**2) - 2*(A*B)*COS
print(ans**0.5)

### FIXED CODE ###

N = int(input())
hon = [2,4,5,7,9]
pon = [0,1,6,8]
if N%10 in hon:
    print("hon")
if N%10 in pon:
    print("pon")
if N%10 == 3:
    print("bon")