Harryxun/stf_run huggingface dataset:
import math
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
def cmb(n, r):
    if n < 0 or r < 0:
        return 0
    if r > n:
        return 0
 
    r = min(n-r, r)
    res = 1
    for i in range(r):
        res *= n - i
n, m = map(int, input().split())
b = [x[1] for x in factorization(m)]
ans = 1
for i in b:
  c = cmb(n+i-1, i)
  ans = ans * c
print(ans%(10**9+7))


### FIXED CODE ###

def factrize(x):
    f = {}
    if x == 1:
        return f
    tmp = x
    i = 2
    while i**2 <= tmp:
        cnt = 0
        while tmp % i == 0:
            cnt += 1
            tmp = tmp//i
        if cnt > 0:
            f[i] = cnt
        i += 1
    if tmp != 1 or f == {}:
        f[tmp] = 1
    return f


def comb(n, r, p):
    x = 1
    for i in range(1, r + 1):
        x *= (n - i + 1) * pow(i, p - 2, p) % p
    return x % p


p = 10**9+7
n, m = map(int, input().split())
A = list(factrize(m).values())
ans = 1
for a in A:
    ans = (ans*comb(a+n-1, a, p)) % p
print(ans)
a=int(input())
s=0
while True:
    if 10**s < a:
        s +=1
    else:
        break
a1=a-10**s
alist=list(str(a1))
aintlist=map(int,alist)
aa=sum(aintlist)
print(s+aa)

### FIXED CODE ###

import math

n = int(input())
sum = 0
length = int(math.log10(n) + 1)

for i in range(length):
	sum += n % 10
	n = int(n / 10)

if sum == 1:
	print(10)
else:
	print(sum)
import numpy as np
n = int(input())
a = np.array([int(i) for i in input().split()])
a_sum = a.sum()
#y = sum - x
ans = 10**15
for i in range(1,n):
    x = a[:i].sum()
    aa = abs(2 * x - a_sum)
    ans = min(ans,aa)
print(ans)

### FIXED CODE ###

import numpy as np
n = int(input())
a = np.array([int(i) for i in input().split()])
a_c = a.cumsum()
a_t = a_c[-1]
diff = np.abs(2 * a_c - a_t)
ans = diff[:-1].min()
print(ans)
S = list(input())

if S[0] == 'A' and S[2:- 1].count('C') == 1:
    S.remove('A').remove('C')
    if ''.join(S).islower:
        print('AC')
    else:
        print('WA')
else:
    print('WA')

### FIXED CODE ###

S = list(input())

if S[0] == 'A' and S[2:- 1].count('C') == 1:
    S.remove('A')
    S.remove('C')
    if ''.join(S).islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')
while True:
	a,op,b = input().split()
	if op = '+':
		print(a+b)
	if op = '-':
		print(a-b)
	if op = '*':
		print(a*b)
	if op = '/':
		print(a/b)
	if op = '?':
		break


### FIXED CODE ###

while 1:
    s=input()
    if '?' in s:break
    print(int(eval(s)))
n=int(input())
a=list(map(int,input().split()))
a.sort()
A=[a[0]]
x=0
sumL=-99999999
for i in range(1,n):
  A.append(a[i-1]+a[i])
for i in range(1,n):
  if sumL<-A[i-1]+sum(a)-A[i-1]:
    sumL=-A[i-1]+sum(a)-A[i-1]
    x=i
print(sumL)
L1=a[0:x]
L2=a[x:n]

if x!=1:
  print(L2[0],L1[0])
  z=L2[0]-L1[0]
  for i in range(1,x-1):
    print(z,L1[i])
    z=z-L1[i]
else:
  z=L2[0]

print(L1[x-1],L2[1])
y=L1[x-1]-L2[1]
for i in range(2,len(L2)):
  print(y,L2[i])
  y=y-L2[i]

print(z,y)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
a.sort()
A=[a[0]]
x=0
sum=sum(a)
sumL=-9999999999
if n==2:
  print(max(a)-min(a))
  print(max(a),min(a))
else:
  for i in range(1,n):
    A.append(A[i-1]+a[i])
  for i in range(1,n):
    if sumL<-A[i-1]+sum-A[i-1]:
      sumL=-A[i-1]+sum-A[i-1]
      x=i
  print(sumL)
  L1=a[0:x]
  L2=a[x:n]

  if x!=1:
    print(L2[0],L1[0])
    z=L2[0]-L1[0]
    for i in range(1,x-1):
      print(z,L1[i])
      z=z-L1[i]
  else:
    z=L2[0]

  if x!=n-1:
    print(L1[x-1],L2[1])
    y=L1[x-1]-L2[1]
    for i in range(2,len(L2)):
      print(y,L2[i])
      y=y-L2[i]
  else:
    y=L1[len(L1)-1]

  print(z,y)
N, M = list(map(int, input().split()))
X_list = sorted(list(map(int, input().split())))
result_list =[]
for i in range(M):
    result = 0
    for x in X_list:
        result += i ^ x
    result_list.append(result)
if len(result_list)==0:
    print(X_list[0])
else:
    print(max(result_list))

### FIXED CODE ###

T, X = list(map(int, input().split()))
print(T/X)
x,n = list(map(int,input().split()))
if n == 0:
  print(x)
  exit()

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

import bisect
p.sort()
i = bisect.bisect_left(p,x)
print(p)
for h in range(1, p[-1]-p[0]+2):
  if p[i-h] != x-h:
    print(x-h)
    exit()
  elif p[i+h] != x+h:
    print(x+h)
    exit()    


### FIXED CODE ###

x,n = list(map(int,input().split()))
if n == 0:
  print(x)
  exit()

p = list(map(int,input().split()))
p = [-1] + p + [102]
import bisect
p.sort()
i = bisect.bisect_left(p,x)
if p[i] != x:
    print(x)
    exit()

for h in range(102):
  if p[i-h] != x-h:
    print(x-h)
    exit()
  elif p[i+h] != x+h:
    print(x+h)
    exit()
import sys
e=iter(map(lambda a:a.split(),sys.stdin))
for a,b in zip(e,e):
 h=0;for s,t in zip(a,b):h+=s==t
 print(h,4-len(set(a)-set(b))-h)


### FIXED CODE ###

import sys
e=iter(map(lambda a:a.split(),sys.stdin))
for a,b in zip(e,e):
 h=0
 for s,t in zip(a,b):h+=s==t
 print(h,4-len(set(a)-set(b))-h)
a = []
for i in range(5):
    a.append(int(input() )) 


t =0
for i,m in enumerate(a):
    t += int(m/10) * 10
    if m%10 != 0:
        t = t + 10

b = [10 - (x%10) for x in a]
b = list(filter(lambda x:x !=10, b))
print(t - max(b))

### FIXED CODE ###

a = []
for i in range(5):
    a.append(int(input() )) 


t =0
s = 0
for m in a:
    t += int(m/10) * 10
    if m%10 != 0:
        t = t + 10
    if 10 - (m%10) > s and m%10 !=0:
        s = 10 - (m%10)

print(t - s)
a,b,c = raw_input().split()
arr = [a,b,c]

print(arr[1],arr[2],arr[0])

### FIXED CODE ###

a,b,c = input().split()
print(str(c)+" "+str(a)+" "+str(b))
N = int(input())
a = list(map(int, input.split()))
r = sum(a)
ra = 0
result = 1e30
for i in range(0,N):
    ra += a[i]
    r -= a[i]
    result = min(result, abs(ra-r))
print(int(result))

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
r = sum(a)
ra = 0
result = 1e30
for i in range(0,N):
    ra += a[i]
    r -= a[i]
    result = min(result, abs(ra-r))
print(int(result))
a,b,c,d=map(int,input().split())
if a+b+c+d==7:
    print(a,"+",b,"+",c,"+",d,"=",7,sep="")
elif a+b+c-d==7:
    print(a,"+",b,"+",c,"-",d,"=",7,sep="")
elif a+b-c+d==7:
    print(a,"+",b,"-",c,"+",d,"=",7,sep="")
elif a+b-c-d==7:
    print(a,"+",b,"-",c,"-",d,"=",7,sep="")
elif a-b+c+d==7:
    print(a,"-",b,"+",c,"+",d,"=",7,sep="")
elif a-b+c-d==7:
    print(a,"-",b,"+",c,"-",d,"=",7,sep="")
elif a-b-c+d==7:
    print(a,"-",b,"-",c,"+",d,"=",7,sep="")
elif a-b-c-d==7:
    print(a,"-",b,"-",c,"-",d,"=",7,sep="")

### FIXED CODE ###

s=input()
a=int(s[0])
b=int(s[1])
c=int(s[2])
d=int(s[3])
if a+b+c+d==7:
    print(a,"+",b,"+",c,"+",d,"=",7,sep="")
elif a+b+c-d==7:
    print(a,"+",b,"+",c,"-",d,"=",7,sep="")
elif a+b-c+d==7:
    print(a,"+",b,"-",c,"+",d,"=",7,sep="")
elif a+b-c-d==7:
    print(a,"+",b,"-",c,"-",d,"=",7,sep="")
elif a-b+c+d==7:
    print(a,"-",b,"+",c,"+",d,"=",7,sep="")
elif a-b+c-d==7:
    print(a,"-",b,"+",c,"-",d,"=",7,sep="")
elif a-b-c+d==7:
    print(a,"-",b,"-",c,"+",d,"=",7,sep="")
else:
    print(a,"-",b,"-",c,"-",d,"=",7,sep="")
import math

N, K = map(int,input().split())
devisor = 10 ** 9 + 7

def C(n,r):
    if r == 0 or r==n:
        return 1
    elif r == 1 or r == n-1:
        return n
    else:
        return math.factorial(n)//math.factorial(r)//math.factorial(n-r)

for i in range(K):
    print(C(N-K+1, i+1)*C(K-1, i) % devisor)

### FIXED CODE ###

N, B = map(int,input().split())
R = N-B
T = 1000000007

def generating_combination(n):
	T = 1000000007
	C = C = [[0 for i in range(n+1)] for j in range(n+1)]
	C[0][0] = 1
	C[1][0] = 1
	C[1][1] = 1
	for i in range(2,n+1):
		C[i][0] = 1
		C[i][i] = 1
		for j in range(1,i):
			C[i][j] = (C[i-1][j-1] + C[i-1][j])%T
	return(C)

D = generating_combination(2000)
for i in range(1,B+1):
	print((D[B-1][i-1]*D[R+1][i])%T)
import sys

N, M = map(int, input().split())
a = [0] * M
b = [0] * M
for i in range(M):
    a[i], b[i] = map(int, input().split())

for i in range(10**N):
    for j in range(M):
        Number = str(i)

        

        if str(Number[a[j] - 1]) != str(b[j]) or len(str(i)) != N:
            break

        if j == M - 1:
            print(i)
            sys.exit()
            
print(-1)

### FIXED CODE ###

import sys

N, M = map(int, input().split())
s = [0] * M
c = [0] * M
for i in range(M):
    s[i], c[i] = map(int, input().split())


for i in range(1000):
    S = str(i)

    if len(S) != N:
        continue

    for j in range(M):
        if int(S[s[j]-1]) != c[j]:
            break
        if j == M-1:
            print(S)
            sys.exit()

    if M == 0:
        print(S)
        sys.exit()

print("-1")
s = list(input().split)
if s.count(s[0]) ==3:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

s = list(input().split())
if s.count(s[0]) == 3:
  print('Yes')
else:
  print('No')
pi = 3.14
r = int(input())
S = r ** 2 * pi
syu = 2 * pi * r

print(str("{0:.6f}".format(S)) + ' ' + str("{0:.6f}".format(syu)))

### FIXED CODE ###

import math
pi = math.pi

r = float(input())
S = r ** 2 * pi
syu = 2 * pi * r

print(str("{0:.6f}".format(S)) + ' ' + str("{0:.6f}".format(syu)))
a=input()
a=int(a)
b=input()
b=int(b)
if ((a*b)%2==1):
  print("Odd")
if((a*b)%2==0):
  print("Even")

### FIXED CODE ###

a,b = map(int,input().split())
c = a*b
if(c%2==0):
    print("Even")
elif(c%2==1):
    print("Odd")
N, K = map(int, input().split())
S = input().split()

def result(S):
    count = 0
    for i in range(len(S)-1):
        if S[i]==S[i+1]:
            count += 1
    return count
  
def reverse(S, l, r):
    for i in range(l-1, r):
        if S[i] == "R":
            S[i] = "L"
        else:
            S[i] = "R"
        return S
M = 0
for r in range(1, N+1):
    for l in range(1, r+1):
        new = result(reverse(S))
        if new > M:
            M = new
print(new)


### FIXED CODE ###

N, K = map(int, input().split())
S = input()
count = 0
for i in range(1, N):
  if S[i] == S[i - 1]:
    count += 1
print(min(N - 1, count + K * 2))
hh

### FIXED CODE ###

A,B=map(int, input().split())
print(max(A+B,A-B,A*B))
nk = list(map(int, list(input().split())))

n = nk[0]
k = nk[1]

countSplit = 1
countPut = n - k + 1

for i in range(k):
    if i == 0:
        print(n - k + 1)
    elif i <= n - k:
        countSplit = int(countSplit * (k - i) / i)
        countPut = int(countPut * (n - k + 1 - i) / (i + 1))
        print(i,(countPut * countSplit) % (10 ** 9 + 7))
    else:
        print(0)

### FIXED CODE ###

import math

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

n = nk[0]
k = nk[1]

countSplit = 1
countPut = n - k + 1

for i in range(k):
    if i == 0:
        print(n - k + 1)
    elif i <= n - k:

        countSplit = math.factorial(k - 1) // math.factorial(k - 1 - i) // math.factorial(i)
        countPut = math.factorial(n - k + 1) // math.factorial(n - k - i) // math.factorial(i + 1)
        """
        countSplit = int(countSplit * (k - i) / i)
        countPut = int(countPut * (n - k + 1 - i) / (i + 1))
        """
        print((countPut * countSplit) % (10 ** 9 + 7))

    else:
        print(0)
import math
N = int(raw_input())
(float)avg = ((float)math.ceil(N/2)/N
print avg

### FIXED CODE ###

import math

N = float(raw_input())
print math.ceil(N/2)/N
n = int(input())
t, a = map(int,input().split())
h = list(map(int,input().split()))
tem = [ans(a - ( t - i * 0.006)) for i in h]
print(tem.index(min(tem)) + 1)

### FIXED CODE ###

n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
tem = [abs(a - (t - i * 0.006)) for i in h]
print(tem.index(min(tem)) + 1)
n,k,q = map(int, list(input().split()))
point=[k]*n
a=[]
	
for i in range(q):
	a.append(int(input()))
	point[a[i]-1]+=1
max=max(point)
for i in range(n):
    if point[i]==max or print[i]-q>0:
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

n,k,q = map(int, list(input().split()))
point=[k]*n
a=[]
	
for i in range(q):
	a.append(int(input()))
	point[a[i]-1]+=1
for i in range(n):
    if point[i]-q>0:
        print("Yes")
    else:
        print("No")
import numpy as np

h, w, m = map(int, input().split())
li = [list(map(int, input().split())) for _ in range(m)]

check = np.zeros((h, w))

for i,j in li:
    check[i-1, :] += 1
    check[:, j-1] += 1
    check[i-1, j-1] -= 1

idx = np.unravel_index(np.argmax(check), check.shape)
print(int(check[idx[0]][idx[1]]))

### FIXED CODE ###

import collections

h, w, m = map(int, input().split())
h_li = []
w_li = []

for i in range(m):
    _h, _w = map(int,input().split())
    h_li.append(_h)
    w_li.append(_w)

h_bomb = [0] * (h+1)
w_bomb = [0] * (w+1)

h_counter = collections.Counter(h_li)
w_counter = collections.Counter(w_li)

for i in range(1, h+1):
    h_bomb[i] = h_counter.get(i, 0)

for i in range(1, w+1):
    w_bomb[i] = w_counter.get(i, 0)
    
ans = max(h_bomb) + max(w_bomb)
allow_count = h_bomb.count(max(h_bomb)) * w_bomb.count(max(w_bomb))

s = 0
cnt = 0
for i in range(m):
    _h, _w = h_li[i], w_li[i]
    if h_bomb[_h] + w_bomb[_w] == ans:
        cnt += 1
    
if cnt < allow_count:
    print(ans)
else:
    print(ans-1)
a,b,c = mac(int,input().split())

if a+b+c > 21:
    print('bust')
else:
    print('win')

### FIXED CODE ###

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

if a+b+c > 21:
    print('bust')
else:
    print('win')
a, b, c = sorted(map(int, input().split()))
print(a+b0

### FIXED CODE ###

a, b, c = sorted(map(int, input().split()))
print(a+b)
import copy
N=int(input())
li = list(map(int,input().split()))
for i in range(0,N):
	li[i] = li[i] - i -1
a = []
d = copy.copy(li)
while len(d) >= 3:
	del d[max(d)]
	del d[min(d)]
for i in range(min(d),max(d)+1):
	k = 0
	for j in range(N):
		k = k + abs(li[j]-i)
	a.append(min(k))

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]
for i in range(0,len(a)):
    a[i] -= (i+1)
a.sort()
b = [ abs(x  - (a[n//2])) for x in a]
print(sum(b))
n = int(input())
a = int(input())
b = int(input())


def calc_sum(n):
    count = 0
    while(True):
        dr = n % 10
        n = n // 10
        if n == 0:
            break
        else:
            count += dr
    return count

count = 0
for i in range(1, n + 1):
    if (a <= calc_sum(i)) and (b >= calc_sum(i)):
        count += 1

print(count) 


### FIXED CODE ###

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

def calc_sum(n):
    dr = 0
    while(True):
        dr += n % 10
        n = n // 10
        if n == 0:
            break
    return dr

count = 0
for i in range(1, n + 1):
    sum = calc_sum(i)
    if (a <= sum) and (b >= sum):
        count += i

print(count)
dice_num = int(input_num[0])
border_socre = int(input_num[1])
ans_p = 0

for score in range(1,dice_num + 1):
    coin_counter = 0
    
    while score <= border_socre:
        score = score * 2
        coin_counter += 1
    ans_p += (1 / dice_num ) * (1/2 ) ** coin_counter
print(ans_p)

### FIXED CODE ###

input_num = input().split()
dice_num = int(input_num[0])
border_socre = int(input_num[1])
ans_p = 0

for score in range(1,dice_num + 1):
    coin_counter = 0
    while score < border_socre:
        score = score * 2
        coin_counter += 1
    ans_p += (1 / dice_num ) * ((1/2 ) ** coin_counter)
    
print(round(ans_p, 12))
from bisect import bisect_left
x, n = map(int, input().split())
if n != 0:
    P = list(map(int, input().split()))
    P = sorted(P)
else:
    P = []

flag = False
ans = []
if x not in P or n == 0:
    ans.append(x)
else:
    idx = bisect_left(P, x)
    for i in range(n):
        for_num = P[idx] + i
        bac_num = P[idx] - i
        if for_num not in P:
            ans.append(for_num)
            flag = True
        if bac_num not in P:
            ans.append(bac_num)
            flag = True
        if flag:
            break

print(min(ans))

### FIXED CODE ###

from bisect import bisect_left
x, n = map(int, input().split())
if n != 0:
    P = list(map(int, input().split()))
    P = sorted(P)
else:
    P = []

flag = False
ans = []
if x not in P or n == 0:
    ans.append(x)
else:
    idx = bisect_left(P, x)
    for i in range(1, 110):
        for_num = P[idx] + i
        bac_num = P[idx] - i
        if for_num not in P:
            ans.append(for_num)
            flag = True
        if bac_num not in P:
            ans.append(bac_num)
            flag = True
        if flag:
            break

print(min(ans))
D = input()
T = input()
S = input()

if(D/S <= T):
	print("Yes")
else:
	print("No")

### FIXED CODE ###

D,T,S = map(int,input().split())

if(D/S <= T):
	print("Yes")
else:
	print("No")
# -*- coding: utf-8 -*-
import math

def conbination(n, r):
    bunshi = math.factorial(n)
    bunbo = (math.factorial(n - r) * math.factorial(r))
    if bunbo == 0:
        return 1
    # return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
    # if r == 0:
    #     return 1
    # bunshi = 1
    # for i in range(n, n-r, -1):
    #     bunshi *= i
    # bunbo = 1
    # for i in range(r, 0, -1):
    #     bunbo *= i
    return int(bunshi/bunbo)

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

for i in range(1, K+1):
    c_blue = conbination(K-1, i-1)
    c_red = conbination(N-K+1, i)
    print((c_blue * c_red) % (10**9 + 7))


### FIXED CODE ###

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

def conbination(n, r):
    return f[n] // (f[r] * f[n-r])

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

f = [1]
for i in range(1, N+1):
    f.append(int(f[i-1]*i))

for i in range(1, K+1):
    if i > N-K+1:
        print(0)
        continue
    c_blue = conbination(K-1, i-1)
    c_red = conbination(N-K+1, i)
    print((c_blue * c_red) % (10**9 + 7))
# -*- coding: utf-8 -*-
# https://atcoder.jp/contests/abc138/tasks/abc138_d

# It's a Python porting of ki.cpp
# Mainly to understand the algorithm by myself

N, Q = list(map(int, input().split()))

tree_link = [None] * 200005
answer = [0] * N


def dfs(v, p=-1):
    for link in tree_link[v]:
        if link == p:  # 親ノードであれば continue
            continue
        answer[link] += answer[v]
        dfs(link, v)


# 双方向の辺を作る
for i in range(N - 1):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1

    if tree_link[a]:
        tree_link[a].append(b)
    else:
        tree_link[a] = [b]

    if tree_link[b]:
        tree_link[b].append(a)
    else:
        tree_link[b] = [a]

# 頂点に値を足し込む
for i in range(Q):
    p, x = list(map(int, input().split()))
    answer[p - 1] += x

# 計算
dfs(0)

# 出力
print(" ".join([str(answer[i]) for i in range(N)]))


### FIXED CODE ###

# -*- coding: utf-8 -*-
# https://atcoder.jp/contests/abc138/tasks/abc138_d


def main():
    n, q = map(int, input().split())
    values = [0] * n
    links = [[] for _ in range(n)]

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

    for _ in range(q):
        p, x = map(int, input().split())
        values[p - 1] += x

    s = [(0, -1)]
    while s:
        i, p = s.pop()
        for j in links[i]:
            if j == p:
                continue
            values[j] += values[i]
            s.append((j, i))

    print(*values)


main()
N == int(input())
count = 0
for i in range(N-1):
  s = list(map(int, input().split()))
  if s[0] == s[1]:
    count += 1
if count >= 3:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N = int(input())
c = 0
for i in range(N):
  a, b = map(int, input().split())
  if a == b:
    c += 1
  else:
    c =0
  if c == 3:
    break
if c == 3:
  print("Yes")
else:
  print("No")
a,b=map(int,input().split())
while a<=1 or 100<=a:
    while b<=1 or 100<=b:
        a,b=int(input());

S=a*b;
L=a+a+b+b;

print(S,L);


### FIXED CODE ###

a,b=map(int,input().split());
print(a*b,2*a+2*b);
n, m = map(int, input().split())
high = list(map(int, input().split()))

judge = ["ok" for i in range(n)]

for i in range(m):
    a, b = [int(s) - 1 for i in input().split()]

    if high[a] < high[b]:
        judge[a] = "ng"
    elif high[a] > high[b]:
        judge[b] = "ng"
    else:
        judge[a] = "ng"
        judge[b] = "ng"

print(judge.count("ok"))


### FIXED CODE ###

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

judge = ["ok" for i in range(n)]

for i in range(m):
    a, b = [int(s) - 1 for s in input().split()]

    if high[a] < high[b]:
        judge[a] = "ng"
    elif high[a] > high[b]:
        judge[b] = "ng"
    else:
        judge[a] = "ng"
        judge[b] = "ng"

print(judge.count("ok"))
a=int(input())
b=int(input())
c=b%a
d=b//a
d=d-1
if c!=0:
    d+=1

print(d)

### FIXED CODE ###

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

for n in range(0,20):
    if n*(a-1)>=b-1:
        break

print(n)
n = int(raw_input())
travel = [map(int, raw_input().split()) for i in range(n)]

accessible_now = [(0,0)]
limit = 1e5 + 1

stroke = 0
for target in travel:
  t, x, y = target
  while (stroke<t):
    stroke += 1
    accessible_next = [] 
    for loc in accessible_now:
      for step in [(1,0),(0,1),(-1,0),(0,-1)]:
        loc_next = (loc[0]+step[0],loc[1]+step[1])
        if ((-1 in loc_next) or (limit in loc_next)):
          continue
        if (loc_next in accessible_next):
          continue
        accessible_next.append(loc_next)
    accessible_now = accessible_next
    #print stroke, t, accessible_now
    if (stroke == t):
      if ((x,y) in accessible_now):
        continue
      else:
        print 'No'
        exit(0) 
res = 'Yes' if (stroke==t) else 'No'
print res


### FIXED CODE ###

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

res = 'Even' if (a*b%2==0) else 'Odd'
print res
import heapq
class UnionFind:
    def __init__(self, n):
        self.n = n
        self.parent = [i for i in range(n)]
        self.rank = [0] * n
    
    def find(self, x):
        if self.parent[x] != x:
            self.parent[x] = self.find(self.parent[x])
        return self.parent[x]
 
    def union(self, x, y):
        x, y = self.find(x), self.find(y)
        if x == y: return
        
        if self.rank[x] < self.rank[y]:
            self.parent[x] = y
        else:
            self.parent[y] = x
            self.rank[x] += (self.rank[x] == self.rank[y])
 
def kruskal(n, edge):
    ans = 0
    uf = UnionFind(n)
    for i in range(len(edge)):
        d, v, u = heapq.heappop(edge)
        
        if uf.find(v) != uf.find(u):
            uf.union(v, u)
            n -= 1
            ans += d
    	if n < 1: return ans
    return ans
 
n = int(input())
x, y = [None]*n, [None]*n
dist = [[0] * n for _ in range(n)]
 
for i in range(n):
    a, b = map(int, input().split())
    x[i] = (a, i)
    y[i] = (b, i)
 
x.sort(key=lambda x:x[0])
y.sort(key=lambda y:y[0])
 
edge = []
for i in range(n-1):
    heapq.heappush(edge, (x[i+1][0]-x[i][0], x[i][1], x[i+1][1]))
    heapq.heappush(edge, (y[i+1][0]-y[i][0], y[i][1], y[i+1][1]))
 
del x, y
print(kruskal(n, edge))

### FIXED CODE ###

import heapq
class UnionFind:
    def __init__(self, n):
        self.n = n
        self.parent = [i for i in range(n)]
        self.rank = [0] * n
    
    def find(self, x):
        if self.parent[x] != x:
            self.parent[x] = self.find(self.parent[x])
        return self.parent[x]

    def union(self, x, y):
        x, y = self.find(x), self.find(y)
        if x == y: return
        
        if self.rank[x] < self.rank[y]:
            self.parent[x] = y
        else:
            self.parent[y] = x
            self.rank[x] += (self.rank[x] == self.rank[y])

def kruskal(n, edge):
    ans = 0
    uf = UnionFind(n)
    while True:
        d, v, u = heapq.heappop(edge)
        
        if uf.find(v) != uf.find(u):
            uf.union(v, u)
            n -= 1
            ans += d
        if n < 2: return ans
    return ans

n = int(input())
x, y = [None]*n, [None]*n

for i in range(n):
    a, b = map(int, input().split())
    x[i] = (a, i)
    y[i] = (b, i)

x.sort(key=lambda x:x[0])
y.sort(key=lambda y:y[0])

edge = []
for i in range(n-1):
    heapq.heappush(edge, (x[i+1][0]-x[i][0], x[i][1], x[i+1][1]))
    heapq.heappush(edge, (y[i+1][0]-y[i][0], y[i][1], y[i+1][1]))

del x, y
print(kruskal(n, edge))
a,b =map(int,input().split())
if 1 <= a,b <=9:
		print(a*b)
		
else:
		print(-1)

### FIXED CODE ###

a,b =map(int,input().split())
if 1 <= a <=9 and 1 <= b <=9:
		print(a*b)
		
else:
		print(-1)