Harryxun/stf_run huggingface dataset:
N,M = list(map(int,input().split()))

MAXN = (10**5)+10
p = 10**9+7
MOD = p
f = [1]
for i in range(MAXN):
    f.append(f[-1] * (i+1) % MOD)
def nCr(n, r, mod=MOD):
    return f[n] * pow(f[r], mod-2, mod) * pow(f[n-r], mod-2, mod) % mod

def prime(X):
    pf={}
    m=X
    for i in range(2,int(m**0.5)+1):
        while m%i==0:
            pf[i]=pf.get(i,0)+1
            m//=i
    if m>1:pf[m]=1
    return pf

pf = prime(M)
powers = list(pf.values())

out = 1
for power in powers:
    out = out*nCr(power+N-1,power)%p

print(out)

### FIXED CODE ###

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

MAXN = 2*(10**5)+10
p = 10**9+7
MOD = p
f = [1]
for i in range(MAXN):
    f.append(f[-1] * (i+1) % MOD)
def nCr(n, r, mod=MOD):
    return f[n] * pow(f[r], mod-2, mod) * pow(f[n-r], mod-2, mod) % mod

def prime(X):
    pf={}
    m=X
    for i in range(2,int(m**0.5)+1):
        while m%i==0:
            pf[i]=pf.get(i,0)+1
            m//=i
    if m>1:pf[m]=1
    return pf

pf = prime(M)
powers = list(pf.values())

out = 1
for power in powers:
    out = out*nCr(power+N-1,power)%p

print(out)
import math
N = int(input())
N_root = math.sqrt(N)
M = int(N_root)
list = []
for i in range(1,M):
  if N%i == 0:
    list.append(i+N//i-2)
list = sorted(list)
print(list[0])

    


### FIXED CODE ###

import math
N = int(input())
N_root = math.sqrt(N)
M = int(N_root)
list = []
for i in range(1,M+1):
  if N%i == 0:
    list.append(i+N//i-2)
list = sorted(list)
print(list[0])
import math
def two_avvreviation(n, m, s, t):
    common = math.gcd(n, m)
    s_common = [a for i, a in enumerate(zip(s)) if i % int(n / common + 10 ** -6) == 0]
    t_common = [a for i, a in enumerate(zip(t)) if i % int(m / common + 10 ** -6) == 0]
    ret = int(n * m / common + 10 ** -6) if s_common == t_common else -1
    return ret


N, M = [int(a) for a in input().split()]
S = int(input())
T = int(input())

print(str(two_avvreviation(N, M, S, T)))

### FIXED CODE ###

import fractions


def two_abbreviation(n, m, s, t):
    common = int(fractions.gcd(n, m) + 10 ** -6)
    s_common = [a for i, a in enumerate(zip(s)) if i % int(n / common + 10 ** -6) == 0]
    t_common = [a for i, a in enumerate(zip(t)) if i % int(m / common + 10 ** -6) == 0]
    ret = int(n * m / common + 10 ** -6) if s_common == t_common else -1
    return ret


N, M = [int(a) for a in input().split()]
S = str(input())
T = str(input())

print(str(two_abbreviation(N, M, S, T)))
from collections import Counter
n = int(input())
arr = list(map(int, input().split()))

if n == 2 and arr[0] != arr[1]:
    print(0)
    exit()

if n == 2 and arr[0] == arr[1]:
    print(1)
    exit()

odd_list =[]
num_list =[]

for i in range(n):
    if i%2 == 0:
        odd_list.append(arr[i])
    if i%2 != 0:
        num_list.append(arr[i])

odd_count = Counter(odd_list)
num_count = Counter(num_list)
odd1 = odd_count[odd_count.most_common()[0][0]]
num1 = num_count[num_count.most_common()[0][0]]



if len(set(arr)) == 1:
    print(int(n/2))
    exit()

if len(set(num_list))==1 and len(set(odd_list))==1:
    print(0)
    exit()

if len(set(odd_count)) == 1 and len(set(num_count)) != 1:
    num2 = num_count[num_count.most_common()[1][0]]
    if odd_list[0] == num_count.most_common()[0][0]:
        print(int(n/2)-num2)
        exit()
    if odd_list[0] != num_count.most_common()[0][0]:
        print(int(n/2)-num1)
        exit()

if len(set(odd_count)) != 1 and len(set(num_count)) == 1:
    odd2 = odd_list[odd_count.most_common()[1][0]]
    if num_list[0] == odd_count.most_common()[0][0]:
        print(int(n/2)-odd2)
        exit()
    if num_list[0] != odd_count.most_common()[0][0]:
        print(int(n/2)-odd1)
        exit()

odd2 = odd_count[odd_count.most_common()[1][0]]
num2 = num_count[num_count.most_common()[1][0]]

if odd_count.most_common()[0][0] != num_count.most_common()[0][0]:
    print(n-odd1-num1)

if odd_count.most_common()[0][0] == num_count.most_common()[0][0]:
    print(min(n-odd1-num2, n-odd2-num1))

### FIXED CODE ###

from collections import Counter
n = int(input())
arr = list(map(int, input().split()))

odd_list =[]
num_list =[]

for i in range(n):
    if i%2 == 0:
        odd_list.append(arr[i])
    if i%2 != 0:
        num_list.append(arr[i])

odd_count = Counter(odd_list)
num_count = Counter(num_list)
odd1 = odd_count[odd_count.most_common()[0][0]]
num1 = num_count[num_count.most_common()[0][0]]

if odd1 != num1:
    print(n-odd_count.most_common()[0][1]-num_count.most_common()[0][1])
    exit()

if len(set(arr)) == 1:
    print(int(n/2))
    exit()

if len(set(num_list))==1 and len(set(odd_list))==1:
    print(0)
    exit()

if len(set(odd_count)) == 1 and len(set(num_count)) != 1:
    num2 = num_count[num_count.most_common()[1][0]]
    if odd_list[0] == num_count.most_common()[0][0]:
        print(int(n/2)-num2)
        exit()
    if odd_list[0] != num_count.most_common()[0][0]:
        print(int(n/2)-num1)
        exit()

if len(set(odd_count)) != 1 and len(set(num_count)) == 1:
    odd2 = odd_list[odd_count.most_common()[1][0]]
    if num_list[0] == odd_count.most_common()[0][0]:
        print(int(n/2)-odd2)
        exit()
    if num_list[0] != odd_count.most_common()[0][0]:
        print(int(n/2)-odd1)
        exit()

odd2 = odd_count[odd_count.most_common()[1][0]]
num2 = num_count[num_count.most_common()[1][0]]

if odd_count.most_common()[0][0] != num_count.most_common()[0][0]:
    print(n-odd1-num1)

if odd_count.most_common()[0][0] == num_count.most_common()[0][0]:
    print(min(n-odd1-num2, n-odd2-num1))
a, b, c = map(int, input().split())
if b == +:
  print(a + c)
else:
  print(a - c)


### FIXED CODE ###

a, b, c = input().split()
a = int(a)
c = int(c)
if b == '+':
  print(a + c)
else:
  print(a - c)
W, H, x, y, r = map(int, raw_input().split())
if x >= r and y >= r and r + y <= H and r + x <= W :
print "Yes"
else:
print "No"

### FIXED CODE ###

W, H, x, y, r = map(int, raw_input().split())
if r <= x and r <= W - x and r <= y and r <= H - y:
   print 'Yes'
else:
   print 'No'
P = 10**9+7
fac = [1]
ifac = [1]
ff = 1
for i in range(1,200001):
  ff *= i
  ff %= p
  fac.append(ff)
  ifac.append(pow(ff, p-2, p))
def ncr(n, r, p): 
  return (fac[n] * ifac[r] % p * ifac[n-r] % p)

h,w,a,b = map(int,input().split())
s = 0
nC = b-1
kC = 0
nD = w-b-1+h-1
kD = h-1
for i in range(h-a):
  C = ncr(nC, kC, P)
  D = ncr(nD, kD, P)
  s = (s + C * D) % P
  nC += 1
  kC += 1
  kD -= 1
  nD -= 1
print(s)


### FIXED CODE ###

a = list(map(int, input().split()))
print('YES' if list(sorted(a)) == [5,5,7] else 'NO')
N=int(input())
xyh=[list(map(int, input().split())) for _ in range(N)]

def find(cx, cy, H):
	for x,y,h in xyh:
		if h != max(H-abs(x-cx)-abs(y-cy), 0):
			return False
	return True

def solve():
	for cx in range(101):
		for cy in range(101):
			x,y,h = xyh[0]
			H = h + abs(x-cx) + abs(y-cy)
			if find(cx, cy, H):
				return "%d %d %d" % (cx, cy, H)
	raise Exception

print(solve())


### FIXED CODE ###

N=int(input())
xyh=sorted([list(map(int, input().split())) for _ in range(N)], key=lambda x: x[2], reverse=True)

def find(cx, cy, H):
	for x,y,h in xyh:
		if h != max(H-abs(x-cx)-abs(y-cy), 0):
			return False
	return True

def solve():
	for cx in range(101):
		for cy in range(101):
			x,y,h = xyh[0]
			H = h + abs(x-cx) + abs(y-cy)
			if find(cx, cy, H):
				return "%d %d %d" % (cx, cy, H)
	raise Exception

print(solve())
import sys
input = sys.stdin.readline
def nibun_right(a, x):
 lo, hi = 0, len(a)
 while lo < hi:
  mid = (lo+hi)//2
  if x < a[mid][0]: hi = mid
  else: lo = mid+1
 return lo
N,D,A=map(int,input().split())
lst=[0]*N
for i in range(N):
 lst[i]=list(map(int,input().split()))
 lst[i][1]=int((lst[i][1]-1)/A))+1
lst.sort(key=itemgetter(0))
DMG=[0]*(N+1)
ans=0
for i in range(N):
 renji=nibun_right(lst,lst[i][0]+2*D)
 Z=max(lst[i][1]-DMG[i],0)
 DMG[i]+=Z
 DMG[renji]-=Z
 ans+=Z
 DMG[i+1]+=DMG[i]
print(ans)



### FIXED CODE ###

def nibun_right(a, x, lo=0, hi=None):
 if lo < 0:
  raise ValueError('lo must be non-negative')
 if hi is None:
  hi = len(a)
 while lo < hi:
  mid = (lo+hi)//2
  if x < a[mid][0]: hi = mid
  else: lo = mid+1
 return lo
N,D,A=map(int,input().split())
lst=[0]*N
for i in range(N):
 lst[i]=list(map(int,input().split()))
lst.sort()
DMG=[0]*N
ans=0
for i in range(N):
 if i!=0:
  DMG[i]+=DMG[i-1]
 renji=nibun_right(lst,lst[i][0]+2*D)
 Z=max(int((lst[i][1]-1)/A)+1-DMG[i],0)
 DMG[i]+=Z
 if renji!=N:
  DMG[renji]-=Z
 ans+=Z
print(ans)
N=int(input())
a=list(map(int,input().split()))

l=sorted(a)

ans=1
targetindex=0
t=l[targetindex]

for i in range (N-targetindex):
    c=l[targetindex+i]
    _ans=1
    if c-t<=2:
        pass
    else:
        _ans=i
    
        if _ans>ans:
            ans=_ans
            targetindex=targetindex+i
            t=[targetindex]
        else:
            pass
print(ans)


### FIXED CODE ###

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

l=[0]*((10**5)+2)

for v in a:
    l[v]+=1
    l[v+1]+=1
    l[v+2]+=1

print(max(l))
n,x=map(int,input().split())
a=list(map(int,input().split()))
if n=<x:#ｎこのDPを作りたいのでｘが超えたらそれを変える必要がある
    x=n-1#でもこれは実際甘え

dp[-1]*n

dp[0]=0#さいしょのところは０かかる
for i in range(1,x+1):#飛べる距離までとべるところから最初の値を引く
    dp[i]=abs(a[i]-a[0])

for i in range(x+1,n):#さいしょのいちから飛べないところからDPを入れる
    min1=10**9
    for j in range(i-(x),i): # 最小を調べる繰り返し
        if min1>dp[j]+abs(a[j]-a[i]):               
            min1=dp[j]+abs(a[j]-a[i])#Xの数最小の値を調べる
    dp[i]=min1
print(dp[-1])

### FIXED CODE ###

n,x=map(int,input().split())
a=list(map(int,input().split()))
dp=[-1]*n
dp[0]=0
if n<=x:
    x=n-1
for i in range(1,x+1):
    dp[i]=abs(a[i]-a[0])

for i in range(x+1,n):
    min1=10**9
    for j in range(i-(x),i):  
        if min1>dp[j]+abs(a[j]-a[i]):               
            min1=dp[j]+abs(a[j]-a[i])
    dp[i]=min1
print(dp[-1])
def check(N, K):
    if N - 1 == K:
        print(N-1)
        for i in range(i + 2, N + 1):
            print(1, i)
        return
    elif N - 2 == K:
        print(N-1)
        for i in range(1, N):
            print(i, i+1)
        return
    elif N-2 > K:
        return
    else:
        print(-1)
        return



if __name__ == "__main__":
    N, K = map(int, input().split())
    check(N, K)


### FIXED CODE ###

def check(N, K):
    if K <= (N - 1)*(N-2) /2:
        k = int((N - 1)*(N-2)/2 - K)
        print(N-1 + k)
        for i in range(2, N+1):
            print(1, i)
        l = 2
        r = 3
        if k != 0:
            for i in range(k):
                if l > N or r > N:
                    break
                print(l, r)
                r+=1
                if r == N+1:
                    l+=1
                    r=l+1
        return
    else:
        print(-1)
        return


if __name__ == "__main__":
    N, K = map(int, input().split())
    check(N, K)
a,b=map(int,input().split())
c = ("a")**b
d = ("b")**a
if a<b:
  print(c)
else:
  print(d)

### FIXED CODE ###

a,b=input().split()
c = str(a)*int(b)
d = str(b)*int(a)
if a<b:
  print(c)
else:
  print(d)
I = [int(input()) for i in range(6)]

I[0] = a
I[5] = e
I[6] = k

if e-a > k:
	print(':(')
else :
	print('Yay!')

### FIXED CODE ###

I =[int(input())for i in range(6)]

if I[4] - I[0] > I[5] :
	print(":(")
else :
	print("Yay!")
N = int(input())
A = list(map(int,input().split()))

cnt = 0
X=[]
for n in A:
    X.append(n)
    X.append(n-1)
    X.append(n+1)

Y = set(X)

y = list(Y)

for x in y:
    transient = 0
    for a in A:
        if -1 <= a - x <= 1:
            transient += 1
    else:
        if transient > cnt:
            cnt = transient

print(cnt)


### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Wed May 13 11:55:25 2020

@author: shinba
"""

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

if x <= t:
    print(0)
else:
    print(x-t)
import math
import sys
sys.setrecursionlimit(100000)

nCr = {}
def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]


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

for i in range(n+1):
    if (k - (i * a)) % b == 0:
        count += cmb(n, i) * cmb(n, (k-i*a)/b)
print(count%998244353)

### FIXED CODE ###

N,A,B,K = map(int,input().split())
sprime = 998244353 # approx 10**9
A,B = sorted((A,B))
if (A+B) * N < K:
	print(0)
	exit()
 
def egcd(a, b):
    if a == 0:
        return (b, 0, 1)
    else:
        g, y, x = egcd(b % a, a)
        return (g, x - (b // a) * y, y)
 
def modinv(a, m):
    g, x, y = egcd(a, m)
    if g != 1:
        raise Exception('modular inverse does not exist')
    else:
        return x % m
 
memo = [0] * (N+1)
memo[0] = memo[N] = 1
for i in range(1,N//2+1):
	v = memo[i-1] * (N-i+1) * modinv(i,sprime)
	v = v % sprime
	memo[i] = memo[N-i] = v
 
# max is A*N + B*N
sum = 0
for b in range(N+1):
  a = (K-b*B)//A
  if 0 <= a <= N and a*A+b*B == K:
    sum += memo[a]*memo[b]
    sum %= sprime
 
print(sum)
def find(a, b, neigh, ans) :
    if a in neigh :
        for v in neigh[a] :
            ans[v - 1] += b
        ans = find(v, b, neigh, ans)
        return ans
    else :
        return ans

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

neigh = {}

for i in range(n - 1) :
    neigh.setdefault(ab[i][0], []).append(ab[i][1])

ans = [0] * n
#print(neigh)

for i in range(q) :
    if px[i][0] in neigh :
        for e in neigh[px[i][0]] :
            ans[e - 1] += px[i][1]
            ans = find(e, px[i][1], neigh, ans)
            '''
            if e in neigh :
                for v in neigh[e] :
                    ans[v - 1] += px[i][1]
            '''
    ans[px[i][0] - 1] += px[i][1]

print(*ans)


### FIXED CODE ###

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

neigh = {}

ans = [0] * n
#print(neigh)
#print(neigh)

for i in range(q) :
    ans[px[i][0] - 1] += px[i][1]

for i in range(n - 1) :
    neigh.setdefault(ab[i][0], []).append(ab[i][1])

sortKey = sorted(neigh.keys())

for k in sortKey :
    for e in neigh[k] :
        ans[e - 1] += ans[k - 1]

print(*ans)

'''
    ans[sortKey]

for i in range(len(sortKey)) :
    for j in range(i + i, len(sortKey)) :
        if sortKey[i] in neigh[sortKey[j]] :
            neigh[sortKey[j]] += neigh[sortKey[i]]
            break

    if px[i][0] in neigh :
        for e in neigh[px[i][0]] :
            ans[e - 1] += px[i][1]


print(*ans)
'''
import numpy as np
n,k=list(map(int,input().split()))
a=sorted(list(map(int,input().split())))
f=sorted(list(map(int,input().split())),reverse=True)
b = [a[i]*f[i] for i in range(n)]

def judgement(x):
    judge = -1
    cnt = 0
    for i in range(n):
        if b[i]>x:
            cnt += -((x-b[i])//f[i])
        if cnt > k:
            judge = False
            break
    if cnt <= k:
        judge = True
    return judge

low=0
high=np.amax(b)
while low<high:
    mid = (low + high)//2
    if judgement(mid) == False:
        low=mid+1
    else:
        high=mid
print(low)

### FIXED CODE ###

n,k=list(map(int,input().split()))
a=sorted(list(map(int,input().split())))
f=sorted(list(map(int,input().split())),reverse=True)
b = [a[i]*f[i] for i in range(n)]

def judgement(x):
    judge = -1
    cnt = 0
    for i in range(n):
        if b[i]>x:
            cnt += -((x-b[i])//f[i])
        if cnt > k:
            judge = False
            break
    if cnt <= k:
        judge = True
    return judge

low=0
high=max(b)
while low<high:
    mid = (low + high)//2
    if judgement(mid) == False:
        low=mid+1
    else:
        high=mid
print(low)
x = input()

print('YES" if x in '753' else 'NO')


### FIXED CODE ###

x = input()
 
print('YES' if x in '753' else 'NO')
alen,blen,k = map(int,input().split())
alist = list(map(int,input().split()))
blist = list(map(int,input().split()))
max = 0

bcount = blen
while sum(blist[:bcount]) > k:
    bcount -= 1
if bcount != 0:
    bsum = sum(blist[:bcount])
for a in range(alen+1):
    acount = alen-a
    asum = sum(alist[:acount])
    if bcount != 0:
        while asum + bsum > k:
            bcount -= 1
            bsum -= blist[bcount-1]
    if acount + bcount > max and asum + sum(blist[:bcount])<=k:
        max = acount + bcount

print(max)


### FIXED CODE ###

anum,bnum,acc = map(int,input().split())
alist = list(map(int,input().split()))
blist = list(map(int,input().split()))

asum = [0]
bsum = [0]
ans = 0
for i in range(anum):
    asum.append(asum[i]+alist[i])
for i in range(bnum):
    bsum.append(bsum[i]+blist[i])

b = bnum
for a in range(anum+1):
    if asum[a] > acc:
        break
    while asum[a] + bsum[b] > acc:
        b -=1
    ans = max(ans,a+b)

print(ans)
input(int(A,B))
int(X)
X = 0
if(A>=B)
X = X + A
A = A - 1
else(B>A)
X = X + B
B = B - 1
print(X)

### FIXED CODE ###

def Y(flag):
    if flag:
        print('YES')
    else:
        print('NO')
 
def y(flag):
    if flag:
        print('Yes')
    else:
        print('No')
 
a,b = map(int,input().split())
l = [a,b,a-1,b-1]
l = sorted(l)
print(l[-1] + l[-2])
import math
n,m=map(int,input().split())
if n=m+1 or m=n+1:
  print((math.factorial(n)*math.factorial(m))%(10**9+7))
elif n=m:
  print(((math.factorial(n)*math.factorial(m))*2)%(10**9+7))
else:
  print(0)
  

### FIXED CODE ###

import math
n,m=map(int,input().split())
if n==m+1 or m==n+1:
  print((math.factorial(n)*math.factorial(m))%(10**9+7))
elif n==m:
  print(((math.factorial(n)*math.factorial(m))*2)%(10**9+7))
else:
  print(0)
S = input()
ans = 0
a = []
up = True
count = 0
for i in S:
    if up:
        if i == '>':
            a.append(count)
            count = 1
            up = False
        else:
            count += 1
    else:
        if i == '<':
            a.append(count)
            count = 1
            up = True
        else:
            count += 1
a.append(count)
a.append(0)
for i in range(0,len(a),2):
    u,d = max(a[i],a[i+1]), min(a[i],a[i+1])-1
    ans += u*(u+1)//2 + d*(d+1)//2
print(ans)
    

### FIXED CODE ###

S = input()
snum = len(S)
N = snum +1
Nar = [0 for i in range(N)]

for i in range(snum):
    if S[i] == '<':
        Nar[i+1] = Nar[i] + 1

for i in reversed(range(N-1)):
    if S[i] == '>':
        Nar[i] = max(Nar[i],Nar[i+1]+1)
sum = 0
for i in Nar:
    sum += i
print(sum)
N=input()
N=int(N)
if N%2=0:
    print(N/2)
else:
    print((N+1)/2)

### FIXED CODE ###

N=int(input())

if N%2==0:
    print(N//2)

else:
    print((N+1)//2)
from collections import deque
h, w = map(int, input().split())
a = [input() for _ in range(h)]
result = []
for i in range(h):
    for j in range(w):
        if a[i][j] == ".":
            q = deque([[i, j]])
            visit = [[-1 for _ in range(w)] for __ in range(h)]
            visit[i][j] = 0
            check = False
            while q:
                y, x = q.popleft()
                for s, t in [[-1,0],[1,0],[0,-1],[0,1]]:
                    if 0<=y+s and y+s<h and 0<=x+t and x+t<w:
                        if a[y+s][x+t]=="#":
                            result.append(visit[y][x]+1)
                            q = 0
                            break
                        elif visit[y+s][x+t]<0:
                            visit[y+s][x+t] = visit[y][x]+1
                            q.append([y+s,x+t])

print(max(result))

### FIXED CODE ###

from collections import deque
h, w = map(int, input().split())
a = [input() for _ in range(h)]
memo = [[-1 if j=="." else 0 for j in list(i)] for i in a]

q = []
for i in range(h):
    for j in range(w):
        if a[i][j]=="#":
            q.append([i, j])
q = deque(q)
while q:
    x, y = q.popleft()
    for s, t in [[1,0],[-1,0],[0,1],[0,-1]]:
        if 0<=x+s and 0<=y+t and x+s<h and y+t<w:
            if memo[x+s][y+t]<0:
                memo[x+s][y+t]=memo[x][y]+1
                q.append([x+s,y+t])
print(max(max(i) for i in memo))
n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  for j in range(a):
    x=[0]*a
    y=[0]*a
    x[j],y[j]=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  

c=0
for i in range(n):
  l=[1]*n
  for j in range(i,n-i):
    if l[j]==0:continue
    for k in range(A[j]):
      b=X[j][k]
      #l[b-1]*
      #b=Y[j][k]
  #if c < l.count(1):
    #c=l.count(1) 
  
        
  
print(c)  
   

### FIXED CODE ###

n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[0]*a
  y=[0]*a
  for j in range(a):
    x[j],y[j]=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  
s=0
for i in range(2**n):
  c=0
  d=0
  B=[0]*n
  for j in range(n):
    if((i >> j) & 1):
      c=c+1
      B[j]=1
  for k in range(n):
    if B[k]==1:
      for j in range(A[k]):
        if Y[k][j]!=B[X[k][j]-1]:
          d=-1
          break
    if d<0:
      break
  if s<c and d==0:
    s=c
      
      
print(s)
A11, A12, A13 = (int(x) for x in input().split())
A21, A22, A23 = (int(x) for x in input().split())
A31, A32, A33 = (int(x) for x in input().split())

N = int(input())

b_list = list()
for i in range(0, N):
    i = int(input())
    b_list.append(i)

A_list = [A11, A12, A13, A21, A22, A23, A31, A32, A33]

for b in b_list:
    for i in range(0, 9):
        if A_list[i] == b:
            A_list[i] = 0

X, Y, Z = 0, 0, 0
for i in range(0, 3):
    k = 3 * i
    if A_list[k] + A_list[k + 1] + A_list[k + 2] == 0:
        X = X + 1
    elif A_list[i] + A_list[i + 3] + A_list[i + 6] == 0:
        Y = Y + 1
    elif A_list[0] + A_list[4] + A_list[8] == 0:
        Z = Z + 1
    elif A_list[2] + A_list[4] + A_list[6] == 0:
        Z = Z + 1
    else:
        continue

if (X+Y+Z) >= 1:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

N = int(input())

if N%2==0:
    print(int(N/2))
else:
    print(int(N/2 )+ 1)
a,b,c,d,e,k = [int(input()) for _ in range(6)]

if e-a > k:
	print(":(")
else
	print("Yey!")

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e-a<=k:
    print("Yay!")
else:
    print(":(")
#%%
import numpy as np
#%%

s,t,q = list(map(int, input().split()))
shrines = []
temples = []
questions = []
answers = []
dist = np.empty((s,t),dtype='int64')

for _ in range(s):
    shrines.append(int(input()))
shrines = np.array(shrines)

for _ in range(t):
    temples.append(int(input()))
temples = np.array(temples)

for _ in range(q):
    questions.append(int(input()))

for i, shrine in enumerate(shrines):
    dist[i]= [abs(shrine - temple) for temple in temples]

#%%
print(shrines,temples,dist)

#%%
for start in questions:
    min_shrine_start = float('inf')
    min_temple_start = float('inf')

    for i, st_s in enumerate(shrines - start):
        abs_st_s = abs(st_s)

        if abs_st_s < min_shrine_start:
            abs_st_s += np.min(dist[i])

            if abs_st_s < min_shrine_start:
                min_shrine_start = abs_st_s

    for j, st_t in enumerate(temples - start):
        abs_st_t = abs(st_t)

        if abs_st_t < min_temple_start:
            abs_st_t += np.min(dist[:,j])

            if abs_st_t < min_temple_start:
                min_temple_start = abs_st_t
    
    answers.append(min(min_shrine_start,min_temple_start))


for ans in answers:
    print(ans)


### FIXED CODE ###

#%%
import bisect

#%%
a,b,q = map(int, input().split())
INF = 10**18
shrines = [-INF] + [int(input()) for _ in range(a)] + [INF]
temples = [-INF] + [int(input()) for _ in range(b)] + [INF]

for _ in range(q):

    start = int(input())

    # スタート位置より右にある神社のうち、もっともスタート位置に近いもの
    shrine_east = shrines[bisect.bisect_right(shrines, start)]
    # スタート位置より右にある寺のうち、もっともスタート位置に近いもの
    temple_east = temples[bisect.bisect_right(temples, start)]

    # スタート位置より左にある神社のうち、もっともスタート位置に近いもの
    shrine_west = shrines[bisect.bisect_right(shrines, start) - 1]
    # スタート位置より左にある寺のうち、もっともスタート位置に近いもの
    temple_west = temples[bisect.bisect_right(temples, start) - 1]

    ans = INF

    for shrine in [shrine_east, shrine_west]:
        for temple in [temple_east,temple_west]:
            cur = min(abs(shrine-start), abs(temple-start)) + abs(shrine-temple)
            ans = min(ans,cur)

    print(ans)
def main():
  	from decimal import Decimal
    a,b = map(decimal,input().split())
    print(int(a*b))
    return
main()

### FIXED CODE ###

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