Harryxun/stf_run huggingface dataset:
N, M = map(int, input().split())
E = [[] for i in range(N)]
RE = [[] for i in range(N)]
for i in range(M):
  u, v = map(int, input().split())
  E[u - 1].append(v - 1)
  RE[v - 1].append(u - 1)
S, T = map(int, input().split())
RD = [-1] * N
RD[T - 1] = 0
Q = [T - 1]
while Q:
  q = Q.pop(0)
  for adj in RE[q]:
    if RD[adj] == -1:
      RD[adj] = RD[q] + 1
      Q.append(adj)
D = [[-1, -1, -1] for i in range(N)]
Q = [[-1, -1, -1] for i in range(4 * N)]
Q[0] = [S - 1, 0, RD[S - 1] % 3]
o = 0
i = 1
while Q:
  q, d, m = Q[o]
  o += 1
  if q == -1:
    break
  if RD[q] == -1:
    continue
  D[q][m] = d + RD[q]
  if m != 0:
    for adj in E[q]:
      _m = (d + 1 + RD[adj]) % 3
      if D[adj][_m] == -1:
        Q[i] = [adj, d + 1, _m]
        i += 1
P = [d[0] for d in D if d[0] != -1]
if P:
  print(min(P) // 3)
else:
  print(-1)

### FIXED CODE ###

N, M = map(int, input().split())
E = [[] for i in range(N)]
RE = [[] for i in range(N)]
for i in range(M):
  u, v = map(int, input().split())
  E[u - 1].append(v - 1)
  RE[v - 1].append(u - 1)
S, T = map(int, input().split())
RD = [-1] * N
RD[T - 1] = 0
Q = [T - 1]
while Q:
  q = Q.pop(0)
  for adj in RE[q]:
    if RD[adj] == -1:
      RD[adj] = RD[q] + 1
      Q.append(adj)
D = [[-1, -1, -1] for i in range(N)]
Q = [[-1, -1, -1] for i in range(M)]
if M:
  Q[0] = [S - 1, 0, RD[S - 1] % 3]
o = 0
i = 1
while Q:
  q, d, m = Q[o]
  Q[o] = [-1, -1, -1]
  o = (o + 1) % M
  if q == -1:
    break
  if RD[q] == -1:
    continue
  D[q][m] = d + RD[q]
  if m != 0:
    for adj in E[q]:
      _m = (d + 1 + RD[adj]) % 3
      if D[adj][_m] == -1:
        Q[i] = [adj, d + 1, _m]
        i = (i + 1) % M
P = [d[0] for d in D if d[0] != -1]
if P:
  print(min(P) // 3)
else:
  print(-1)
*l = map(int, open(0).read().split())
if l[1] % l[0] == 0:
	print(l[0] + l[1])
else:
	print(l[1] - l[0])

### FIXED CODE ###

*l, = map(int, open(0).read().split())
if l[1] % l[0] == 0:
	print(l[0] + l[1])
else:
	print(l[1] - l[0])
N = int(input())

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

a = prime_factorize(n = N)

if len(a) > 2:
    b = a[0] * a[1]
    if b > 9:
        print('No')
    else:
        print('Yes')
else:
    if (a[0] > 9):
        print('No')
    else:
        print('Yes')

### FIXED CODE ###

N = int(input())

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

a = prime_factorize(n = N)
ans = 'Yes'


if len(a) == 0:
    if N > 9:
        ans = 'No'
elif len(a) > 4:
    if N / 8 > 9:
        ans = 'No'
elif len(a) == 3:
    if a[1] * a[2] > 9:
        ans = 'No'
else:
    n = N
    b = []
    for i in a:
        n = n / i
        b.append(n)

    if a[0] > 9:
        ans = 'No'
    if N > 81:
        ans = 'No'
    
print(ans)
n, k = [int(i) for i in input().split()]
h = [int(input()) for i in range(n)]
INF = 10 ** 9 + 1

h.sort()
ans = INF
for ki in range(k):
    d = h[k + ki - 1] - h[ki]
    if ans > d:
        ans = d

print(ans)

### FIXED CODE ###

n, k = [int(i) for i in input().split()]
h = [int(input()) for i in range(n)]
h.sort()
print(min(h[k + ki - 1] - h[ki] for ki in range(n - k + 1)))
a, b =raw_input().split(" ")

if a == b:
print "="
elif a < b
print "<"
elif a > b
print ">"

### FIXED CODE ###

a, b =input().split(" ")
 
if a == b:
    print("=")
elif a < b:
    print("<")
elif a > b:
    print(">")
a,b = map(int,input().splilt())
print((a+b)//24)

### FIXED CODE ###

a,b = map(int,input().split())
print((a+b)%24)
s = input()
q = int(input())
for _ in range(q):
    split = input().split()
    if split[0] == '1':
        s = s[::-1]
    else:
        if split[1] == '1':
            s = split[2] + s
        else:
            s = s + split[2]
print(s)


### FIXED CODE ###

s = input()
if s == 'AAA' or s == 'BBB':
    print('No')
else:
    print('Yes')
print((int(input())+int(input()))%24)

### FIXED CODE ###

a, b = [ int(v) for v in input().split() ]
print((a+b)%24)
a,b,c=map(int, input().split())
if(a+b==c)||(b+c==a)||(a+c==b):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a,b,c=map(int, input().split())
if(a+b==c)or(b+c==a)or(a+c==b):
    print("Yes")
else:
    print("No")
a, b, k = int(input().split())

if a <= k:
  if b -(k - a) <=0:
    print('0 0')
  else:
    s = 0
    t = b - (k - a)
    print('{} {}'.format(s, t))
else:
  s = a - k
  t = b
  print('{} {}'.format(s, t))


### FIXED CODE ###

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

if a <= k:
  if b -(k - a) <=0:
    print('0 0')
  else:
    s = 0
    t = b - (k - a)
    print('{} {}'.format(s, t))
else:
  s = a - k
  t = b
  print('{} {}'.format(s, t))
import math

n, q = map(int, input().split(" "))
abL = [list(map(int, input().split(" "))) for _ in range(n - 1)]
pxL = [list(map(int, input().split(" "))) for _ in range(q)]

to = [[] for _ in range(n)]
ans = [0 for _ in range(n)]


def dfs(v, p=-1):
    for u in to[v]:
        if u == p:
            continue
        ans[u] += ans[v]
        dfs(u, v)


for a, b in abL:
    a -= 1
    b -= 1
    to[a].append(b)
    to[b].append(a)

for p, x in pxL:
    p -= 1
    ans[p] += x

dfs(0)

for a in ans:
    print(a)

### FIXED CODE ###

import math
import sys

sys.setrecursionlimit(200005)

n, q = map(int, input().split(" "))
abL = [list(map(int, input().split(" "))) for _ in range(n - 1)]
pxL = [list(map(int, input().split(" "))) for _ in range(q)]

to = [[] for _ in range(200005)]
ans = [0 for _ in range(n + 1)]


def dfs(v, p=-1):
    for u in to[v]:
        if u == p:
            continue
        ans[u] += ans[v]
        dfs(u, v)


for a, b in abL:
    a -= 1
    b -= 1
    to[a].append(b)
    to[b].append(a)

for p, x in pxL:
    p -= 1
    ans[p] += x

dfs(0)

for a in ans[:n]:
    print(a)
from collections import defaultdict
from operator import itemgetter
import sys

input = sys.stdin.readline

n, k = map(int, input().split())
e = defaultdict(list)
for _ in range(n):
    t, d = map(int, input().split())
    t -= 1
    e[t].append(d)

tops = []
rests = []
for l in e.values():
    for i, d in enumerate(sorted(l, key=itemgetter(0), reverse=True)):
        if i == 0:
            tops.append(d)
        else:
            rests.append(d)

tops.sort(reverse=True)
c_tops = [0]
for t in tops:
    c_tops.append(c_tops[-1] + t)

rests.sort(reverse=True)
c_rests = [0]
for t in rests:
    c_rests.append(c_rests[-1] + t)

ans = 0
for i in range(1, min(k, len(tops)) + 1):
    if k - i > len(rests): continue
    ans = max(ans, c_tops[i] + c_rests[k - i] + pow(i, 2))
print(ans)


### FIXED CODE ###

# 解説放送

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

e = [None for _ in range(N + 1)] # 種別の美味しさ
t_kinds_count = 0 # 何種類あるか
rest_length = 0 # 各種の2番手以降の個数の総数

tops = [] # 各種の最大美味しさ
c_tops = [0] # 各種の最大美味しさの累積和
rests = [] # 各種の2番手以降
c_rests = [0] # 各種の2番手以降の累積和

for _ in range(N):
    t, d = map(int, input().split())
    if e[t] is None:
        e[t] = []
        t_kinds_count += 1
    e[t].append(d)


for t in range(1, N + 1):
    if e[t] is None:
        continue
    e[t].sort(reverse=True)
    tops.append(e[t][0])
    rests.extend(e[t][1:])

tops.sort(reverse=True)
rests.sort(reverse=True)

s = 0
for tt in tops:
    s += tt
    c_tops.append(s)

s = 0
for rr in rests:
    s += rr
    c_rests.append(s)
    rest_length += 1

ans = 0
for yy in range(1, min(t_kinds_count, K) + 1):
    if 0 <= K - yy <= rest_length:
        ans = max(ans, c_tops[yy] + c_rests[K - yy] + yy * yy)

# print(e)
# print(tops)
# print(c_tops)
# print(rests)
# print(c_rests)
print(ans)
s= input()
if s.count(s[0]) == 2 && s.count(s[1]) == 2:
  print("Yes")
else :
  print("No")  

### FIXED CODE ###

s = input()
s = list(s)
s.sort()
if s[0] == s[1] and s[2] == s[3] and s[1] != s[3]:
  print("Yes")
else :
  print("No")
import math
X = int(input())
A = 100
c = 0

for i in range(X):
  A = A * 1.01
  if math.floor(A) == X:
    c = c+1
    break
    
  c = c+1

print(c)

### FIXED CODE ###

X = int(input())
A = 100
c = 0
while(A < X):
  A = int(A * 1.01)
  c = c + 1
  
print(c)
n=int(input())
dp=[float("inf")]*100000
dp[0]=0

for i in range(n):
    power = 1
    while power <= n:
        dp[i + power] = min(dp[i + power],dp[i] + 1)
        power *= 6
    power = 1
    while power <= n:
        dp[i + power] = min(dp[i + power],dp[i] + 1)
        power *= 9

print(dp[n])

### FIXED CODE ###

N=int(input())
dp=[float('inf')]*100010
dp[0]=0
base=[1, 6, 36, 216, 1296, 7776, 46656, 9, 81, 729, 6561, 59049]


for i in range(N+1):
    for power in base:
        dp[i]=min(dp[i],dp[i-power]+1)

print(dp[N])
def gcd(a,b):
    if a<b: a,b=b,a
    while b: a,b = b, a%b
    return a
def main():
  a, b = map(int, input().split())
  c = gcd(a, b)
  ans = 1
  i = 2
  while c!=1:
    if c%i==0: ans+=1
    while c%i==0: c//=i
    i+=1
  print(ans)
if __name__=="__main__":main()

### FIXED CODE ###

def prefactor(x):
  ret = set()
  for i in range(2, int(x**0.5)+1):
    if x%i==0: ret.add(i)
    while x%i==0: x //= i
  if x>1: ret.add(x)
  return ret
    

a, b = map(int, input().split())
print(1+len(prefactor(a) & prefactor(b)))
n, k = map(int, input(9.split()))

print(n-k+1)                
        


    







        



### FIXED CODE ###

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

print(n-k+1)
def f(X,Y):
    return X//Y

A,B,C,D = map(int, input().split())
X = B-A+1
if (C>D):
    x = C
    y = D
else:
    y = C
    x = D

r = x % y
while(r!=0):
    x = y
    y = r
    r = x % y

print("%d" % (X - f(X, C) - f(X, D) + f(X, C*D//y)))

### FIXED CODE ###

S = input()
prev = S[0]
for s in S[1:]:
  if s == prev:
    print("Bad")
    exit()
  prev = s
    
print("Good")
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 = p.sort(reverse=True)
q = q.sort(reverse=True)
r = r.sort(reverse=True)
p = p[:X]
q = q[:Y]
sumlist = list()
sumlist.extend(p)
sumlist.extend(q)
sumlist.extend(r)
sumlist = sumlist.sort(reverse=True)
print(sum(sumlist[:X+Y]))

### 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)
p = p[:X]
q = q[:Y]
sumlist = list()
sumlist.extend(p)
sumlist.extend(q)
sumlist.extend(r)
sumlist.sort(reverse=True)
print(sum(sumlist[:X+Y]))
from collections import deque
N,M,*L,S,T = map(int,open(0).read().split())
G = [[] for _ in range(N)]
step = [0 for _ in range(N)]
step[(S-1)*3] = 0
for u,v in zip(*[iter(L)]*2):
	G[u-1].append(v-1)
q = deque([(S-1,0)])
while q:
	cur,d = q.popleft()
	for nxt in G[cur]:
		if nxt==T-1 and (d+1)%3==0:
			print((d+1)//3)
			exit()
		if not step[nxt] & 1<<((d+1)%3):
			step[nxt] |= 1<<(d+1)%3
			q.append((nxt,d+1))
print(-1)

### FIXED CODE ###

from collections import deque
N,M,*L,S,T = map(int,open(0).read().split())
G = [[] for _ in range(N)]
step = [[-1]*3 for _ in range(N)]
step[S-1][0] = 0
for u,v in zip(*[iter(L)]*2):
	G[u-1].append(v-1)
q = deque([(S-1,0)])
while q:
	cur,d = q.popleft()
	for nxt in G[cur]:
		if nxt==T-1 and (d+1)%3==0:
			print((d+1)//3)
			exit()
		if step[nxt][(d+1)%3] < 0:
			step[nxt][(d+1)%3] = d+1
			q.append((nxt,d+1))
print(-1)
import math
A,B,C,D = map(int, input().split())

GcdCD = math.gcd(C,D)
LcmCD = (C*D)//GcdCD

s1 = B- ((B//C)+(B//D)-(B//LcmCD))
s2 = (A-1)-(((A-1)//C)+((A-1)//D)-((A-1)//LcmCD))
if s2 < 0:
    s2 = 0
print(s1-s2)

### FIXED CODE ###

def gcd(a, b):
    if b > a:
        _ = b
        b = a
        a = _
    while b:
        a, b = b, a % b
    return a

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

GcdCD = gcd(C,D)
LcmCD = (C*D)//GcdCD

s1 = B- ((B//C)+(B//D)-(B//LcmCD))
s2 = (A-1)-(((A-1)//C)+((A-1)//D)-((A-1)//LcmCD))
if s2 < 0:
    s2 = 0
print(s1-s2)
n,W = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(n)]
inf = float('INF')
bag = [inf for _ in range(10**5+1)]
bag[0] = 0

ans = 0
for w,v in a:
    left = v if v < 100001 else 100001
    right = left + ans + 1 if left + ans + 1 < 100001 else 100001
    for i in range(left, right)[::-1]:
        if bag[i-v] + w < bag[i] and bag[i-v] + w < W+1):
            bag[i] = bag[i-v] + w
            if i > ans:
                ans = i
print(ans)


### FIXED CODE ###

n,W = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(n)]
inf = float('INF')
bag = [inf for _ in range(10**5+1)]
bag[0] = 0

ans = 0
for w,v in a:
  for i in range(min(v,10**5+1), 10**5+1)[::-1]:
    if bag[i-v] + w < min(bag[i],W+1):
        bag[i] = bag[i-v] + w
        ans = max(ans, i)
print(ans)
mod = pow(10, 9) + 7

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

graph = {}

for _ in range(n-1):
	a, b = map(int, input().split())
	a -= 1
	b -= 1
	graph[a] = graph.get(a, []) + [b]
	graph[b] = graph.get(b, []) + [a]

def dfs(v):
	ans = k	# k choices of color for root
	stack = [v]
	vis_set = {v, }

	while stack:
		v = stack.pop()
		if v==0: avail_count = k-1
		else: avail_count = k-2
		for nxt in graph[v]:
			if nxt not in vis_set:
				if avail_count <= 0:
					return 0
				ans = (ans*avail_count)%mod
				avail_count -= 1
				stack.append(nxt)
				vis_set.add(nxt)
	return ans

ans = dfs(0)
print(ans)

### FIXED CODE ###

from collections import defaultdict

mod = pow(10, 9) + 7

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

graph = defaultdict(list)

for _ in range(n-1):
	a, b = map(int, input().split())
	a -= 1
	b -= 1
	graph[a].append(b)
	graph[b].append(a)

def dfs(v):
	global graph, k
	ans = k	# k choices of color for root
	stack = [v]
	vis_set = {v, }

	while stack:
		v = stack.pop()
		if v==0: 
			avail_count = k-1
		else: 
			avail_count = k-2
		for nxt in graph[v]:
			if nxt not in vis_set:
				if avail_count <= 0:
					return 0
				ans = (ans*avail_count)%mod
				avail_count -= 1
				stack.append(nxt)
				vis_set.add(nxt)
	return ans

ans = dfs(0)
print(ans)
N = int(input())
print((N//2)+1/2N if N%2 != 0 else 0.5 )


### FIXED CODE ###

N = int(input())
print(((N//2)+1)/N if N%2 != 0 else "0.5" )
N,M=map(int,input().split())
PY=[list(map(int,input().split())) for i in range(M)]
x=collections.defaultdict(list)
for city,year in PY:
    x[city]+=[year]
for city,year in PY:
    num=bisect.bisect(x[city],year)
    print("%06d%06d"%(city,num))

### FIXED CODE ###

import collections
import bisect
n,m=map(int,input().split())
p=[[int(j) for j in input().split()] for i in range(m)]
a=collections.defaultdict(list)
for x,y in sorted(p):
    a[x]+=[y]
for x,y in p:
    z=bisect.bisect(a[x],y)
    print("%06d%06d"%(x,z))
N,Q = map(int,input().split())
aLst = [[int(x) for x in input().split()] for _ in range(N-1)]
pLst = [[int(x) for x in input().split()] for _ in range(Q)]

tmpLst = [[] for _ in range(N+1)]
for i, j in aLst:
    tmpLst[i].append(j)
    tmpLst[j].append(i)

ansLst = [0] * (N + 1)
for i,j in pLst:
    ansLst[i] += j

def dfs(v, p, add):
    ansLst[v] += add
    for i in tmpLst[v]:
        if i == p:
            continue
        dfs(i, v, ansLst[v])


dfs(1, 0, 0)

ans = ' '.join(map(str, ansLst[1:]))
print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

# 遅延評価で加えてあげるだけ

N,Q = map(int,input().split())
AB = [[int(x) for x in input().split()] for _ in range(N-1)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]

graph = [[] for _ in range(N+1)]
for a,b in AB:
    graph[a].append(b)
    graph[b].append(a)

value = [0] * (N+1)
for p,x in PX:
    value[p] += x
    
q = [(1,0)]
while q:
    x,parent = q.pop()
    value[x] += value[parent]
    for y in graph[x]:
        if y == parent:
            continue
        q.append((y,x))

answer = ' '.join(map(str,value[1:]))
print(answer)
n = int(input())
xyh = [tuple(map(int,input().split())) for i in range(n)]

for cx in range(101):
    for cy in range(101):
        ch = None
        okflag = True
        for x,y,h in xyh:
            if h == 0:
                if ch <= abs(x-cx) + abs(y-cy):
                    okflag = False
                    break
                continue
            if ch == None:
                ch = h + abs(x-cx) + abs(y-cy)
                continue

            if ch != h + abs(x-cx) + abs(y-cy):
                okflag = False
                break

        if okflag == True:
            print(cx, cy, ch)
            exit()


### FIXED CODE ###

n = int(input())
xyh = [tuple(map(int,input().split())) for i in range(n)]

candidates =[]

for cx in range(101):
    for cy in range(101):
        ch = None
        for x,y,h in xyh:
            if h == 0:

                continue
            if ch == None:
                ch = h + abs(x-cx) + abs(y-cy)
                continue

            if ch != h + abs(x-cx) + abs(y-cy):
                break

        else:
            xyh_c = (cx, cy, ch)
            candidates.append(xyh_c)

for xyh_c in candidates:
    cx, cy, ch = xyh_c
    for x,y,h in xyh:
        if h != max(ch - abs(x-cx) - abs(y-cy) ,0):
            break
    else:
        print(cx, cy, ch)
        exit()
import math
a,b,x=map(int,input().split())

bottle=(a**2)*b

if x <= bottle/2:
  # 半分以上傾ける場合
  soko=(x*2/b)/a
  
  #bに対してtangent(r)がsokoとなるrを求める
  r=90-(math.degrees(math.atan(soko/b)))
  
else:
  # 半分傾けられない場合
  takasa=((a**2)*b-x)*2/(a**2)
  
  #takasaに対してtangent(r)がaとなるrを求める
  r=90-(math.degrees(math.atan(a/takasa)))

print(r)

### FIXED CODE ###

import math
a,b,x=map(int,input().split())

bottle=(a**2)*b

if x <= bottle/2:
  # 半分以上傾ける場合
  soko=(x*2/b)/a
  
  #bに対してtangent(r)がsokoとなるrを求める
  r=90-(math.degrees(math.atan(soko/b)))
  
else:
  # 半分傾けられない場合
  takasa=((a**2)*b-x)*2/(a**2)
  
  #takasaに対してtangent(r)がaとなるrを求める
  if takasa==0:
    r=0
  else:
      r=90-(math.degrees(math.atan(a/takasa)))

print(r)
s=input()
a=[]
for i in s:
	if i == 'B':
      if x:
		a.pop()
	else:
		a.append(i)
print(''.join(a))

### FIXED CODE ###

n,l=map(int,input().split())
s=list(input() for _ in range(n))
s.sort()
result=''.join(s)
print(result)
# ABC 122: B – ATCoder
S = input()
ACGT = 'AGCT'
longest = 0

for start in range(len(S)):
    current = 0
    if S[start] in ACGT:
        current += 1

        if start + 1 < len(S):
            next = start + 1
            while S[next] in ACGT:
                current += 1
                next += 1
        
        longest = max(longest, current)

print(longest)

### FIXED CODE ###

# ABC 122: B – ATCoder
s = input()
acgt = 'ACGT'

length = 0
max_length = 0

for i in range(len(s)):
    if s[i] in acgt:
        for j in range(len(s) - i):
            if s[i + j] in acgt:
                length += 1
            else:
                break

        max_length = max(max_length, length)
        length = 0

print(max_length)
a = input()
b = input()

if a[0] < b[0]:
  print(a+b)
else:
  print(b+a)

### FIXED CODE ###

a, b = input().split()

print(b+a)
import fractions
def gcd_list(list1):
    ans=list1[0]
    for i in range(len(list1)):
        ans=fractions.gcd(ans,list1[i])
    return ans
N=int(input())
A=list(map(int,input().split()))
n=0
for i in range(N):
    b=A[i]
    A.remove(A[i])
    m=gcd_list(A)
    n=max(n,m)
    A.insert(i,b)
print(n)

### FIXED CODE ###

A,B,T=map(int,input().split())
print(int(((T+0.5)//A)*B))
import math

def get_primes(max_number):#return prime list smaller than max_number
    
    if max_number == 2:
        return [2]
    elif max_number < 3:
        return []
    
    numbers=range(1, max_number + 2, 2)
    nroot=math.floor(max_number ** 0.5)
    n=len(numbers)
    numbers[0]=0
    for i in range(1, n):
        x = numbers[i]
        if x > nroot:
            break
        if x and i + x < n:
            for j in range(i+x,n+1,x):
                numbers[j] = 0
    x=[2] + filter(None, numbers[1:])
    return x

n=[]
i=0
while (True):
    try:
        n.append([i,input(), 0])
        i+=1
    except:
        break

n=sorted(n, key=lambda x: x[1])
for i, e in enumerate(get_primes(n[-1][1])):
    for j in range(len(n)):
        if e<=n[j][1]:
            n[j][2]+=1

n=sorted(n, key=lambda x: x[0])
for e in n:
    print e[2]

### FIXED CODE ###

import sys,math
def prime(m):
  N=range(1,m+2,2)
  r=int(m**.5)
  h=len(N)
  N[0]=0
  for i in range(h):
    x=N[i]
    if x>r:break
    if x and i+x<h:N[i+x:h:x]=[0]*((h-1-i-x)/x+1)
  N[0]=2
  return filter(None,N)
A=map(int,sys.stdin)
n=max(A)
B=[0]*(n+1)
i=0
c=0
for e in prime(n):
  while e>i:
    B[i]=c
    i+=1
  c+=1
  if i==n+1:break
else:
  for i in range(i,n+1):B[i]=c
for e in A:print B[e]
import itertools
N,M,X = map(int,input().split())
A = [0,0,0,0]
C = []
Z = []
cz = []
for i in range(N) :
    C.append(list(map(int,input().split())))

for i in range(1,N+1) :
    c = list(itertools.combinations(C,i))
    for j in range(len(c)) :
        A = [0,0,0,0]
        cj = c[j]
        for k in range(i) :
            ck = cj[k]
            A[0]+= ck[0]
            A[1] += ck[1]
            A[2] += ck[2]
            A[3] += ck[3]
        if A[1]>=X and A[2]>= X and A[3]>=X :
            cz.append(A[0])        

if len(cz) == 0 :
    print(-1)
else :
    print(min(cz))


### FIXED CODE ###

import numpy
N,M,X = map(int,input().split())
A = numpy.array([[int(i) for i in input().split()] for _ in range(N)])
ans = 10**8
for i in range(2**N) :
    i = format(i,'b').zfill(N)
    check = numpy.array([0]*(M+1))
    for j in range(N) :
        if i[j] == '0' :
            continue
        check +=  A[j][0:]
    if all (check[m] >= X for m in range(1,M+1)) :
        ans = min(ans,check[0])

if ans == 10**8 :
    print(-1)
else :
    print(ans)
import sys
if __name__ == "__main__":
    N, M = map(int, sys.stdin.readline().split())
    P = [0] * (N + 1)
    C = [0] * M

    for m in range(M):
        p, y = map(int, input().split())
        C[m] = [m, p, y, 0]
    C.sort(key=lambda x :x[2])

    for c in C:
        P[c[1]] += 1
        c[3] = P[c[1]]
    C.sort(key=lambda x :x[0])

    for c in C:
        print("{}{}".format(str(c[1]).zfill(6), str(c[3]).zfill(6)))

### FIXED CODE ###

A, B = list(map(int, input().split()))
print(A + (B // 2))
import numpy as np
def f(n):
    counts = [0]*n
    x_max = int(np.sqrt(n-5)//1)
    for x in range(1,x_max+1):
        y_max = int(np.sqrt(n-x**2-4)//1)
        for y in range(1,y_max+1):
            z_max = int(np.sqrt(n-x**2-y**2-3)//1)
            for z in range(1,z_max+1):
                if x**2+y**2+z**2+x*y+y*z+z*x < n:
                    counts[x**2+y**2+z**2+x*y+y*z+z*x-1] += 1
    return counts
 
N = int(input())
counts = f(N)
for i in range(N):
    print(counts[i])

### FIXED CODE ###

import numpy as np
def f(n):
    counts = [0]*n
    x_max = int(np.sqrt(n))
    for x in range(1,x_max+1):
        y_max = int(np.sqrt(n-x**2))
        for y in range(1,y_max+1):
            z_max = int(np.sqrt(n-x**2-y**2))
            for z in range(1,z_max+1):
                if x**2+y**2+z**2+x*y+y*z+z*x <= n:
                    counts[x**2+y**2+z**2+x*y+y*z+z*x-1] += 1
    return counts
 
N = int(input())
counts = f(N)
for i in range(N):
    print(counts[i])
L = []

while True:
    l = list(map(int, input().split()))
    if l:
        L.append(l)
    else:
        break

print(L)

N = L[0][0]
K = L[0][1]

Num = list(range(1, N + 1, 1))

new_L = L[2::2]

new_LL = sum(new_L, [])
for n in new_LL:
    if n in Num:
        Num.remove(n)

print(len(Num))

### FIXED CODE ###

import sys

L = []
"""
while True:
    l = input()
    if l == "":
        break
    else:
        L.append(list(map(int,l.split())))
        print(L)
"""
N,K = list(map(int,input().split()))

#print(N,K)

for a in range(2 * K):
    n = list(map(int,input().split()))
    L.append(n)

#print("End",L)

Num = list(range(1, N + 1, 1))
#print(Num)
new_L = L[1::2]
#print(new_L)

new_LL = sum(new_L, [])
for n in new_LL:
    if n in Num:
        Num.remove(n)

print(len(Num))
r = int(input().split())
print(r * r)


### FIXED CODE ###

r = int(input().strip())
print(r * r)