Harryxun/stf_run huggingface dataset:
a = int(input())
b = int(input())
 
if a >= 13:
  print(b)
elif a >= 6 and a <= 12:
  print(int(b/2))
else:
  print(0)


### FIXED CODE ###

a,b = map(int, input().split())
 
ans=0
if a <= 5:
	ans = 0
elif a >= 6 and a<=12:
	ans = b/2
else:
	ans = b
 
print(int(ans))
a, b, c, d = [int(tmp) for tmp in input().split()]
if k <= a :
  print(k)
elif k <= a+b :
  print(a)
else :
  print(a-(k-a-b))

### FIXED CODE ###

a, b, c, k = [int(tmp) for tmp in input().split()]
if k <= a :
  print(k)
elif k <= a+b :
  print(a)
else :
  print(a-(k-a-b))
import sys
a,b,c,d,e,f=map(int,input().split())
ans=0
s=0
t=0
for i in range(f//100+1):
    if i==0 and j==0:
        continue
    w=(f-100*a*i)//100
    for j in range(w+1):
        x=a*i+b*j
        for k in range(x*e//c+1):
            if k==0 and l==0:
                continue
            v=(x*e-c*k)//d
            for l in range(v+1):
                y=c*k+d*l
                if 100*x+y <=f:
                    p=100*y/(100*x+y)
                    if ans<p:
                        s=100*x+y
                        t=y
print(s,t)

### FIXED CODE ###

a,b,c,d,e,f=map(int,input().split())
ans=0
s=0
t=0
for i in range(f//100+1):
    w=(f-100*a*i)//100
    for j in range(w+1):
        if i==0 and j==0:
            continue
        x=a*i+b*j
        for k in range(x*e//c+1):
            v=(x*e-c*k)//d
            for l in range(v+1):
                y=c*k+d*l
                if 100*x+y <=f:
                    p=100*y/(100*x+y)
                    if ans<=p:
                        s=100*x+y
                        t=y
                        ans=p
print(s,t)
import math 
a,b = map(int,input().split())
print(math.ceil(a/x))

### FIXED CODE ###

import math 
a,b = map(int,input().split())
print(math.ceil(a/b))
stairs = int(input())
stair_status = list(map(int,input().split(" ")))

move = 0
move_max = 0
for i in range(stairs-1):
    if stair_status[i]>=stair_status[i+1]:
        move += 1
        if move>move_max:
            move_max = move
    else:
        count.append(move)
        if move>move_max:
            move_max = move
        move = 0  #reset
    
else:
    print(move_max)

### FIXED CODE ###

stairs = int(input())
stair_status = list(map(int,input().split(" ")))

move = 0
count = [0]
for i in range(stairs-1):
    if stair_status[i]>=stair_status[i+1]:
        move += 1
        count.append(move)
    else:
        count.append(move)
        move = 0  #reset
    
else:
    print(max(count))
_ = int(input())
h = list(map(int, input().split()))
inf = float('inf')
dp = [inf] * len(h)

def rec_opt(i):
    if dp[i] < inf:
        return dp[i]
    if i == 0:
        return 0
    elif i ==1:
        return abs(h[0] - h[1])
    else:
        ans = min(inf, rec_opt(i-1) + abs(h[i] - h[i-1]))
        if i > 1:
            ans = min(ans, rec_opt(i-2) + abs(h[i] - h[i-2]))
        dp[i] = ans
    return dp[i]
print(rec_opt(len(h)-1))

### FIXED CODE ###

_ = int(input())
h = list(map(int, input().split()))

opt = [0] * len(h)
opt[1] = abs(h[0]-h[1])

for i in range(2,len(h)):
    A = opt[i-1] + abs(h[i-1] - h[i])
    B = opt[i-2] + abs(h[i-2] - h[i])
    opt[i] = min(A, B)

print(opt[len(h)-1])
n = 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:
        divisors.append(n//i)
  return divisors

def digit(n):
  for i in range(10):
    if n>=10**i and n<10**(i+1):
      return i+1
      break

list = make_divisors(n)

ans = 12

for i in list:
  if max(digit(i), digit(n/i)) < ans:
    ans = max(digit(i), digit(n/i))

print(ans)
  
  

### FIXED CODE ###

n = int(input())

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

def digit(n):
  for i in range(15):
    if n>=10**i and n<10**(i+1):
      return i+1
      break

list = make_divisors(n)

ans = 2345

for i in list:
  if max(digit(i), digit(n/i)) < ans:
    ans = max(digit(i), digit(n/i))

print(ans)
k = int(input())
s = input()
l = len(s)
if l <= k:
	print(s)
else: 
  	print(s[0:k]"...")


### FIXED CODE ###

k = int(input())
s = input()
if int(len(s)) <= k:
  	print(str(s))
else:
  	print(((str(s))[0:k]) + "...")
a,b = map(int, [i for i in input().split(' ')])
print a*b, (a+b)*2

### FIXED CODE ###

import sys
a,b = map(int, [i for i in sys.stdin.readline().split(" ")])
print a*b, (a+b)*2
a=input()
print(2* \pi *a)

### FIXED CODE ###

import math
a=int(input())
print(2* math.pi *a)
import math

r = int(raw_input())
print str(float(r)**2 * math.pi) + " " + str(float(r) * 2 * math.pi)

### FIXED CODE ###

import math
import sys

r = float(raw_input())
print str('%.5f' % (r**2 * math.pi)) + " " + str('%.5f' % (r * 2 * math.pi))
sys.exit()
n = int(input())
s = str(input())
MOD = 10**9 + 7

if n % 2 == 1 and (s[0] == "W" or s[-1] == "W"):
    print(0)
    exit()

kai = [1 for _ in range(n+1)]
for i in range(1, n+1):
    kai[i] = (kai[i-1] * i) % MOD

ans = 1
count = 0
pre = s[0]
for i in range(1, 2*n):
    if s[i] == pre:
        count += 1
    else:
        ans *= kai[count+1]
        ans %= MOD
        count = 0
    pre = s[i]

ans *= kai[n]
ans %= MOD
print(ans)

### FIXED CODE ###

N = int(input())
S = input()
ss = [1 if s == 'W' else 0 for s in S]

def mul(a, b):
    return (a * b) % (10**9 + 7)

ans = 1
num = 0
for s in ss:
    if num % 2 == s:
        num += 1
    else:
        ans = mul(ans, num)
        num -= 1

if num > 0:
    ans = 0

for i in range(2, N + 1):
    ans = mul(ans, i)

print(ans)
from collections import deque
while True:
    W,H = map(int, input().split())
    if W == 0: break
    es = [[] for i in range(W*H)]
    for y in range(H):
        walls_h = map(int, input().split())
        for x in range(W-1):
            if walls_h[x]: continue
            es[y*W + x].append(y*W + x+1)
            es[y*W + x+1].append(y*W + x)
        if y == H-1: break
        walls_v = map(int, input().split())
        for x in range(W):
            if walls_v[x]: continue
            es[y*W + x].append((y+1)*W + x)
            es[(y+1)*W + x].append(y*W + x)
    q = deque([0])
    dist = [0] * (W*H)
    dist[0] = 1
    while q:
        fr = q.popleft()
        for to in es[fr]:
            if dist[to] == 0:
                dist[to] = dist[fr] + 1
                q.append(to)
    print(dist[-1])

### FIXED CODE ###

from collections import deque
while True:
    W,H = map(int, input().split())
    if W == 0: break
    es = [[] for i in range(W*H)]
    for y in range(H):
        walls_h = list(map(int, input().split()))
        for x in range(W-1):
            if walls_h[x]: continue
            es[y*W + x].append(y*W + x+1)
            es[y*W + x+1].append(y*W + x)
        if y == H-1: break
        walls_v = list(map(int, input().split()))
        for x in range(W):
            if walls_v[x]: continue
            es[y*W + x].append((y+1)*W + x)
            es[(y+1)*W + x].append(y*W + x)
    q = deque([0])
    dist = [0] * (W*H)
    dist[0] = 1
    while q:
        fr = q.popleft()
        for to in es[fr]:
            if dist[to] == 0:
                dist[to] = dist[fr] + 1
                q.append(to)
    print(dist[-1])
import re
s = input()
odd = s[::2]
eve = s[1::2]
odd_re = re.compile{^[RUD]*$}
eve_re = re.compile{^[LUD]*$}
if odd_re.findall(odd) != [] and eve_re.findall(eve) != []:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

import re
s = input()
odd = s[::2]
eve = s[1::2]
odd_re = re.compile(r"^[RUD]*$")
eve_re = re.compile(r"^[LUD]*$")
if odd_re.findall(odd) != [] and eve_re.findall(eve) != []:
    print("Yes")
else:
    print("No")
m=int(input())
d=int(input())
ans=0
for i in range(1,m+1):
  for j in range(10,d+1):
    if i==(j//10)*(j%10) and j//10>1 and j%10>1:ans+=1
print(ans)

### FIXED CODE ###

I=lambda:input()
L=lambda:list(map(int,I().split()))
m,d=L()
a=0
for i in range(1,m+1):
  for j in range(10,d+1):
    if i==(j//10)*(j%10)and j//10>1 and j%10>1:a+=1
print(a)
n=input()

if n="AAA" or n="BBB":
  print("No")
else:
  print("Yes")

### FIXED CODE ###

n=input()

if n=="AAA" or n=="BBB":
  print("No")
else:
  print("Yes")
x = int(input())

dp = [0 for _ in range(x + 1)] #0:"No", 1:"Yes"
dp[0] = 1
for i in range(100, 106):
    dp[i] = 1
for i in range(106, x + 1):
    if dp[i-100] == 1 or dp[i-101] == 1 or dp[i-102] == 1 or dp[i-103] == 1 or dp[i-104] == 1 or dp[i-105] == 1:
        dp[i] = 1
print(dp[x])


### FIXED CODE ###

# -*- coding: utf-8 -*-
x = int(input())

tmp1 = (x % 100) // 5
tmp2 = ((x % 100) - tmp1 * 5) // 4
tmp3 = ((x % 100) - tmp1 * 5 - tmp2 * 4) // 3
tmp4 = ((x % 100) - tmp1 * 5 - tmp2 * 4 - tmp3 * 3) // 2
tmp5 = (x % 100) - tmp1 * 5 - tmp2 * 4 - tmp3 * 3 - tmp4 * 2
if x // 100 >= tmp1 + tmp2 + tmp3 + tmp4 + tmp5:
    print(1)
else:
    print(0)
from random import *
D=int(input())
C=list(map(int,input().split()))
S=[list(map(int,input().split())) for i in range(D)]
X=[0]*26
XX=X[:]
Y=X[:]
YY=X[:]
P=[]
SC=0
N,M,L,O=0,0,0,0
for i in range(D):
  for j in range(26):
    X[j]+=C[j]
    XX[j]+=X[j]
  N,M=-1,-10**20
  L,O=N,M
  for j in range(26):
    if Y==-1:
      N,M=0,X[0]+S[i][0]
    if M<X[j]+S[i][j]:
      L,O=N,M
      N,M=j,X[j]+S[i][j]
    elif O<X[j]+S[i][j]:
      L,O=j,X[j]+S[i][j]
  XX[N]-=X[N]
  X[N]=0
  P.append([N,L])
  SC+=X[N]
SC2=0
for i in range(10**5*3):
  d,q=randrange(0,D),randrange(0,26)
  SC2=SC
  SC2-=S[d][P[d][0]]
  SC2+=S[d][q]
  for j in range(26):
    Y[j]=0
  YY[P[d][0]],YY[q]=0,0
  for j in range(D):
    if j==d:
      Z=q
    else:
      Z=P[j][0]
    Y[P[d][0]]+=C[P[d][0]]
    Y[q]+=C[q]
    Y[Z]=0
    YY[P[d][0]]+=Y[P[d][0]]
    YY[q]+=Y[q]
  if SC2-sum(YY)>=SC-sum(XX):
    P[d][0]=q
    XX=YY[:]
    SC=SC2
for i in range(D):
  SC2=SC
  d,q=i,P[i][1]
  SC2-=S[d][P[d][0]]
  SC2+=S[d][q]
  for j in range(26):
    Y[j]=0
  YY[P[d][0]],YY[q]=0,0
  for j in range(D):
    if j==d:
      Z=q
    else:
      Z=P[j][0]
    Y[P[d][0]]+=C[P[d][0]]
    Y[q]+=C[q]
    Y[Z]=0
    YY[P[d][0]]+=Y[P[d][0]]
    YY[q]+=Y[q]
  if SC2-sum(YY)>=SC-sum(XX):
    P[d]=P[d][::-1]
    XX=YY[:]
    SC=SC2
T=0
X=[0]*26
SC=0
for i in range(D):
  print(P[i]+1)

### FIXED CODE ###

D=int(input())
for i in range(D):
  print(i%26+1)
n = int(input())
P = [int(input()) for _ in range(n)]
sorted = sorted(P)
count = 0

for i in range(n):
  if P[i] == sorted[i]:
    count += 1

if count == n or count == n-2:
  print("YES")
else:
  print("NO")
  

### FIXED CODE ###

n = int(input())
P = list(map(int, input().split()))
sorted = sorted(P)
count = 0

for i in range(n):
  if P[i] == sorted[i]:
    count += 1

if count == n or count == n-2:
  print("YES")
else:
  print("NO")
N, Q = list(map(int, input().split()))
S = input()
T = [list(map(int, input().split())) for _ in range(Q)]

total_list = []
total = 0
for i in range(N):
  if S[i] == 'A' and S[i+1] == 'C':
    total += 1
  total_list.append(total)

for i in range(Q):
  l, r = T[i][0], T[i][1]
  if l != 1:
    print(total_list[r-2]-total_list[l-2])
  else:
    print(total_list[r-2])

### FIXED CODE ###

N, Q = list(map(int, input().split()))
S = input()
T = [list(map(int, input().split())) for _ in range(Q)]

total_list = []
total = 0
try:
  for i in range(N-1):
    if S[i] == 'A' and S[i+1] == 'C':
      total += 1
    total_list.append(total)

  for i in range(Q):
    l, r = T[i][0], T[i][1]
    if l != 1:
      print(total_list[r-2]-total_list[l-2])
    else:
      print(total_list[r-2])
except IndexError:
  print(0)
A =input()
print('Bad' if A[0] == A[1] | A[1] == A[2] | A[2] == A[3] | A[3] == A[4]  else 'Good')


### FIXED CODE ###

S=list(input())
c=0
for i in range(3):
    if S[i]==S[i+1]:
        c+=1
print('Bad' if c>0 else 'Good')
import math

a, b = input().split()
A, B = [int(a), int(b.replace('.', '')]

print(A * B // 100)

### FIXED CODE ###

import math

a, b = input().split()
A, B = [int(a), int(b.replace('.', ''))]

print(A * B // 100)
N = int(input())
A = list(map(int,input().split( )))
start = 0
def f(tail,head):
    if tail < head:
        return 1
    elif tail > head:
        return -1
    else:
        return 0
i = 0
actions = ['stay' for _ in range(N)]
while f(A[i],A[i+1]) == 0:
    i += 1
if f(A[i],A[i+1]) == 1:
    actions[i] = 'buy'
else:
    actions[i] = 'stay'
before = f(A[i],A[i+1])
for j,(tail,head) in enumerate(zip(A[i+1:],A[i+2:])):
    now = f(tail,head)
    if now == before:
        before = now
    elif now == 0:
        before = before
    else:
        if before == -1:
            actions[j+i+1] = 'buy'
        else:
            actions[j+i+1] = 'sell'
        before = now
actions[-1] = 'sell'

def action(stock,money,a,price):
    if a == 'stay':
        return stock,money
    elif a == 'buy':
        stock += money//price
        money = money%price
        return stock,money
    else:
        money += stock*price
        stock = 0
        return stock,money
    
stock = 0
money = 1000
for a,price in zip(actions,A):
    stock,money = action(stock,money,a,price)
print(money)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split( )))
def f(tail,head):
    if tail < head:
        return 1
    elif tail > head:
        return -1
    else:
        return 0

actions = ['stay' for _ in range(N)]

if N > 2:
    i = 0
    while f(A[i],A[i+1]) == 0:
        i += 1
        if i+1 == N-1:
            break
    if f(A[i],A[i+1]) == 1:
        actions[i] = 'buy'
    else:
        actions[i] = 'stay'
    before = f(A[i],A[i+1])
    for j,(tail,head) in enumerate(zip(A[i+1:],A[i+2:])):
        now = f(tail,head)
        if now == before:
            before = now
        elif now == 0:
            before = before
        else:
            if before == -1:
                actions[j+i+1] = 'buy'
            else:
                actions[j+i+1] = 'sell'
            before = now

else:
    if f(A[0],A[1]) == 1:
        actions[0] = 'buy'
actions[-1] = 'sell'

def action(stock,money,a,price):
    if a == 'stay':
        return stock,money
    elif a == 'buy':
        stock += money//price
        money = money%price
        return stock,money
    else:
        money += stock*price
        stock = 0
        return stock,money
    
stock = 0
money = 1000
for a,price in zip(actions,A):
    stock,money = action(stock,money,a,price)
print(money)
a,b,k=map(int,input().split())
c=max(a,b)
l=[]
for i in range(1,c):
	if a%i==0 and b%i==0:
		l.append(i)
l.sort(reverse=True)
print(l[k-1])

### FIXED CODE ###

a,b,k=map(int,input().split())
c=max(a,b)
l=[]
for i in range(1,c+1):
	if a%i==0 and b%i==0:
		l.append(i)
l.sort(reverse=True)
print(l[k-1])
, B = map(int, input().split())
     
if (A + B) % 2 == 0:
  print((A + B) / 2)
else:
  print("IMPOSSIBLE")

### FIXED CODE ###

A, B = map(int, input().split())
     
if (A + B) % 2 == 0:
  print((A + B) // 2)
else:
  print("IMPOSSIBLE")
R,G,B,N = map(int,input().split())
a = sorted([R,G,B],reverse=True) 
R,G,B = a[0],a[1],a[2]

count = 0
for r in range(N//R+1):
  if r*R>N:break
  for g in range(N//G+1):
    if r*R+g*G>N: break
    for b in range(N//B+1):
      if  (r)*R+(g)*G+(b)*B == N:
        count += 1
print(count)
        


### FIXED CODE ###

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

print(n-k+1)
n = list(input())
s_L = list(map(int,input().split())

s_L = list(sorted(s_L,reverse=True))
if s_L[0] < sum(s_L[1:]):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

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

s_L = list(sorted(s_L,reverse=True))
if s_L[0] < sum(s_L[1:]):
    print("Yes")
else:
    print("No")
N, K = map(int, input().split())
list_A = [1]*N
for i in range(K):
    d = int(input())
    l = list(map(int, input().split()))
    for J range(d):
        if list_A[l[j]-1]  == 1:
            list_A[l[j]-1]  = 0

print(list_A.count(1))        
        
        

### FIXED CODE ###

N, K = map(int, input().split())
list_A = [1]*N
for i in range(K):
    d = int(input())
    l = list(map(int, input().split()))
    for j in range(d):
        if list_A[l[j]-1]  == 1:
            list_A[l[j]-1]  = 0

print(list_A.count(1))
import sys
import numpy as np
import collections
n,k = [int(x) for x in sys.stdin.readline().split()]
r = collections.defaultdict(int)
for i in range(n):
	a, b = [int(x) for x in sys.stdin.readline().split()]
	r[a] += b
d = sorted(r.items())
c = 0
for i,j in enumerate(d):
	c += j
	if c >= k:
		print(int(i))
		break


### FIXED CODE ###

import sys
import numpy as np
import collections
n,k = [int(x) for x in sys.stdin.readline().split()]
r = collections.defaultdict(int)
for i in range(n):
	a, b = [int(x) for x in sys.stdin.readline().split()]
	r[a] += b
d = sorted(r.items())
c = 0
for i,j in enumerate(d):
	c += j[1]
	if c >= k:
		print(int(j[0]))
		break
n,x=map(int,input().split())
L=list(map(int,input().split()))
count=0
high=0
for i in range(n+1):
  if high>x:
    break
  else:
    count+=1
    if i<n+1:
        high+=L[i]

print(count)

### FIXED CODE ###

n,x=map(int,input().split())
L=list(map(int,input().split()))
count=1
high=0
for i in range(n):
    high+=L[i]
    if high<=x:
        count+=1


print(count)
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

totalA = [0]
totalB = [0]
sumA = 0
for i in range(N):
    sumA += A[0]
    totalA.append(sumA)
sumB = 0
for i in range(M):
    sumB += B[0]
    totalB.append(sumB)

iA = N
iB = 0
countMax = 0
while iA >= 0:
    if totalA[iA] + totalB[iB] > K:
        iA -= 1
    else:
        if iB < M:
            countMax = max(countMax, iA + iB)
            iB += 1
    elif iA == N and iB == M:
        countMax = max(countMax, iA + iB)
        break

print(countMax)



### FIXED CODE ###

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

totalA = [0]
totalB = [0]
sumA = 0
for i in range(N):
    sumA += A[i]
    totalA.append(sumA)
sumB = 0
for i in range(M):
    sumB += B[i]
    totalB.append(sumB)

iB = M
countMax = 0
for iA in range(N+1):
  if totalA[iA]>K:
    break
  else:
    while totalA[iA] + totalB[iB] > K:
      iB -= 1
  countMax = max(countMax,iA+iB)

print(countMax)
x = int(input())
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr

c = factorization(x)
#print(c)
chk = False
for i in c:
  if chk:
    break
  s,t = i
  #print(s)
  for i in range(130):
    if (i+s)**5-i**5 > x:
      break
    if (i+s)**5-i**5 == x:
      ans = (i+s,i)
      chk = True
      break
  for i in range(1,100):
    j = -1*i
    #print(j+s,j)
    if (j+s)**5-j**5 > x:
      break 
    if (j+s)**5-j**5 == x:
      ans = (j+s,j)
      chk = True
      break 
      
print(*ans)


### FIXED CODE ###

s = input()
if s == 'ABC':
  print('ARC')
else:
  print('ABC')
import math
a,b=map(int,input().split())

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))

### FIXED CODE ###

import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

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

print(lcm(a, b))
import sys
import math
import itertools
s = input()
ans=''
for i in range(len(s)):
    if (s[i] == '?'):
        if (i!=len(s)-1 and s[i + 1] == 'D' or s[i+1]=='?'):
            ans += 'P'
        else:
            ans+='D'
    else:
        ans += s[i]
print(ans)
            

### FIXED CODE ###

import sys
import math
import itertools
s = input()
ans=''
for i in range(len(s)):
    if(s[i]=='?'):
        ans+='D'
    else:
        ans += s[i]
print(ans)
import math
print(math.ceil((a+b)/2))

### FIXED CODE ###

print((sum(map(int,input().split()))+1)//2)
n = int(input())
p = input().split()

j = p[0]
count = 1
for i in range(n):
    if p[i] <= j:
        count += 1
        j = p[i]
print(count)

### FIXED CODE ###

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

result = "Yes" if n == m else "No"
print(result)
[M,N]=[int(item) for item in input().split()]

num={}

for _ in range(N):
    [s,c] = [int(item) for item in input().split()]
    if s > M or  not M==1 and  s == 1 and c == 0:
        print(-1)
        exit()
    if s in num:
        if num[s] == c:
            continue
        else:
            print(-1)
            exit()
    num[s]=c

#print(num)
#数字にする
num_int = 0

if M == 1:
    print(num[1])
    exit()

if  1 in num:
    num_int = num[1]
else:
    num_int=1

for i in range(2, M + 1):
    num_int*=10
    if i in num:
        num_int+=num[i]

print(num_int)

### FIXED CODE ###

[M,N]=[int(item) for item in input().split()]

num={}

for _ in range(N):
    [s,c] = [int(item) for item in input().split()]
    if s > M or  not M==1 and  s == 1 and c == 0:
        print(-1)
        exit()
    if s in num:
        if num[s] == c:
            continue
        else:
            print(-1)
            exit()
    num[s]=c

#print(num)
#数字にする
num_int = 0

if M == 1:
    if  1 in num:
        print(num[1])
    else:
        print(0)
    exit()

if  1 in num:
    num_int = num[1]
else:
    num_int=1

for i in range(2, M + 1):
    num_int*=10
    if i in num:
        num_int+=num[i]

print(num_int)
N, M = map(int, input().split())
A = [0]*N
res = True
for m in range(M):
    s, c = map(int, input().split())
    if A[s-1] != 0:
        if A[s-1] != c:
            res = False
            break
    else:
        A[s-1] = c
if len(A) == 1:
    A = str(A[2])
elif len(A) == 2:
    A = str(A[1]) + str(A[2])
else:
    A = str(A[0]) + str(A[1]) + str(A[2])
if res:
    print(A)
else:
    print('-1')

### FIXED CODE ###

N, M = map(int, input().split())
S = []
C = []
for m in range(M):
    s, c = map(int, input().split())
    S.append(s)
    C.append(c)
cnt = -1
man = False
for n in range(1000):
    num = str(n)
    res = True
    if len(num) != N:
        res = False
        continue
    for m in range(M):
        if num[S[m]-1] != str(C[m]):
            res = False
    if res:
        cnt = int(num)
        man = True
        break
if man:
    print(cnt)
else:
    print(cnt)
s = str(input())
s[-1] = z
if z = 2 or 4 or 5 or 7 or 9;
	print("hon")
elif z = 0 or 1 or 6 or 8;
    print("pon")
else;
	print("bon")

### FIXED CODE ###

s =str(input())
z = int(s[-1])
if z == 2 or z == 4 or z == 5 or z == 7 or z == 9:
	print("hon")
elif z == 0 or z == 1 or z == 6 or z == 8:
    print("pon")
else:
	print("bon")