Harryxun/stf_run huggingface dataset:
N,M=map(int,input().split())
foods=[0]*M

for i in range(N):
  KA=list(map(int,input().split())
  for a in KA[1:]:
    foods[a-1]+=1

cnt=0
for j in foods:
  if j==N:
    cnt+=1

print(cnt)



### FIXED CODE ###

N,M = map(int,input().split())
foods = [0]*M
 
for i in range(N):
  KA = list(map(int,input().split()))
  
  for a in KA[1:]:
    foods[a-1] += 1
  
cnt = 0
for j in foods:
  if j == N:
    cnt += 1
    
print(cnt)
A, B = map(int, input().split())
x = 0

if A - B > 1:
  x = 2A - 1
elif B - A > 1:
  x = 2B - 1
else:
  x = A + B

print(x)

### FIXED CODE ###

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

if A - B > 1:
  x = 2 * A - 1
elif B - A > 1:
  x = 2 * B - 1
else:
  x = A + B

print(x)
N = int(input())
# スペース区切りの整数の入力
A = list(map(int, input().split()))


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

ans=[]

for i in range(3):
    B=A[:]
    del B[i]
    sol=0
    for b in B:
        sol=gcd(sol,b)
    ans.append(sol)


print(max(ans))



### FIXED CODE ###

A, B, T = map(int, input().split())
print(int((T+1/2)/A)*B)
a,b =map(int,input().split())
print(sum(i==i[::-1] for i in map(str,range(a,b+1)))

### FIXED CODE ###

a,b =map(int,input().split())
print(sum(i==i[::-1] for i in map(str,range(a,b+1))))
s=input().split()
a=0
for i in range(3):
	if s[i]==A:
		a+=1
if a==0 or a==3:
	print('No')
else:
	print('Yes')

### FIXED CODE ###

s=list(input())
a=0
for i in range(3):
	if s[i]=='A':
		a+=1
if a==0 or a==3:
	print('No')
else:
	print('Yes')
a, b = int(input()), int(input())
print(a*b)

### FIXED CODE ###

a, b = map(int, input().split())
print(int(a*b))
# -*- coding: <encoding name> -*-

import math
n, d = map(int, input())
range = d * 2 + 1
print(math.ceil(n / range))

### FIXED CODE ###

# -*- coding: <encoding name> -*-

import math
n, d = map(int, input().split())
range = d * 2 + 1
print(math.ceil(n / range))
import copy

N = int(input())
A = []
for i in range(N):
    A.append(int(input()))

chinpo = max(A)
B = copy.copy(A)
while max(A) in B:
    B.remove(max(A))
chinchin = max(B)

for i in range(N):
    if chinpo > A[i]:
        print(chinpo)
    else:
        print(chinchin)




### FIXED CODE ###

import copy

N = int(input())
A = []
for i in range(N):
    A.append(int(input()))

chinpo = max(A)
B = copy.copy(A)
B.remove(max(A))
chinchin = max(B)

for i in range(A.index(max(A))):
    print(chinpo)
print(chinchin)
for i in range(A.index(max(A))+1,N):
    print(chinpo)
n = int(input())
,l* = map(int,input().split())
inv=0
for i in l:
  inv += 1/i
print(1/inv)

### FIXED CODE ###

n = int(input())
*l, = map(int,input().split())
inv=0
for i in l:
  inv += 1/i
print(1/inv)
from collections import defaultdict
n,k=map(int,input().split())
xy=[list(map(int,input().split())) for _ in range(n)]
xwl=dict((c[0],i) for i,c in enumerate(xy))
ywl=dict((c[1],i) for i,c in enumerate(xy))
x=list(xwl.keys())
y=list(ywl.keys())
x.sort()
y.sort()

xdict=dict()
ydict=dict()
xdict[x[0]]=[1<<xwl[x[0]],0]
ydict[y[0]]=[1<<ywl[y[0]],0]
size=lambda x:sum(x>>i&1 for i in range(n))
minus=lambda x,y:(x|y)^y
for i in range(1,n):
  xdict[x[i]]=[xdict[x[i-1]][0]|(1<<xwl[x[i]]), xdict[x[i-1]][1]|(1<<xwl[x[i-1]])]
  ydict[y[i]]=[ydict[y[i-1]][0]|(1<<ywl[y[i]]), ydict[y[i-1]][1]|(1<<ywl[y[i-1]])]

cand=[min(ans,(x[t]-x[s])*(y[v]-y[u])) for s in range(n) for t in range(n) \
 for u in range(n) for v in range(n) \
 if size(minus(xdict[x[t]][0],xdict[x[s]][1])&\
                minus(ydict[y[v]][0],ydict[y[u]][1]))>=k and s<t and u<v]

print(min(cand))


### FIXED CODE ###

from collections import defaultdict
def main():
  n,k=map(int,input().split())
  xy=[list(map(int,input().split())) for _ in range(n)]
  x=[p[0] for p in xy]
  y=[p[1] for p in xy]
  x.sort()
  y.sort()
  
  s1=[[0]*n for _ in range(n)]
  s2=[[0]*n for _ in range(n)]
  s3=[[0]*n for _ in range(n)]
  s4=[[0]*n for _ in range(n)]
  for i in range(n):
    for j in range(n):
        for p in xy:
            if p[0]<=x[i] and p[1]<=y[j]:
              s1[i][j]+=1
              s2[i][j]+=(p[0]<x[i])
              s3[i][j]+=(p[1]<y[j])
              s4[i][j]+=(p[0]<x[i])*(p[1]<y[j])
  ans=float('inf')
  for s in range(n):
    for t in range(s+1,n):
      for u in range(n):
        for v in range(u+1,n):
          if s1[t][v]-s3[t][u]-s2[s][v]+s4[s][u]>=k:
            ans=min(ans,(x[t]-x[s])*(y[v]-y[u]))
  print(ans)

if __name__=='__main__':
  main()
s=input()
l = []
l.append(s[0])
c = 0
for i in range(1, n):
  if s[i] == l[i-1]:
    c += 1
    l.append(str(-(int(s[i])-1)))
  else:
    l.append(s[i])
print(c)

### FIXED CODE ###

s=input()
l = []
l.append(s[0])
c = 0
for i in range(1, len(s)):
  if s[i] == l[i-1]:
    c += 1
    l.append(str(-(int(s[i])-1)))
  else:
    l.append(s[i])
print(c)
import numpy as np

N, W = map(int, input().split())
w, v = [], []
for i in range(N):
    a, b = map(int, input().split())
    w += [a]
    v += [b]

DP = np.zeros(W + 1, dtype=int)

# i 円以下で買える商品の最大価値
for i in range(N):
    # print(DP[w[i]:])
    # print(DP[:-w[i]])
    # print(DP[:-w[i]] + v[i])
    DP[w[i]:] = np.maximum(DP[:-w[i]] + v[i], DP[w[i]:])
    # print(DP)
print(DP[-1])

### FIXED CODE ###

N,W=map(int,input().split())
k=[[0,0] for i in range(N)]
dp=[[0]*(W+1) for j in range(N+1)]
for i in range(N):
    k[i][0],k[i][1]=map(int,input().split())



for i in range(N):
    for w in range(W+1):
        if k[i][0]>w:
            dp[i+1][w]=dp[i][w]
        else:
            dp[i+1][w] = max(dp[i][w-k[i][0]]+k[i][1],dp[i][w])


print(dp[N][W])
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
mod = int(1e9 + 7)
one_or_two = [0] + [1] + [2] + [-1] * n
for i in range(3, n + 3):
    one_or_two[i] = (one_or_two[i-1] + one_or_two[i-2]) % mod
ans = 1
if a[0] > 1:
    ans *= one_or_two[a[0]-1]
for i in range(1, m):
    if a[i] - a[i-1] == 2:
        continue
    ans *= one_or_two[a[i] - a[i-1] - 2]
    ans %= mod
if n - a[-1] > 1:
    ans *= one_or_two[n - a[m-1] - 1]
print(ans % mod)

### FIXED CODE ###

n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
mod = int(1e9 + 7)
one_or_two = [0] + [1] + [2] + [-1] * n
for i in range(3, n + 3):
    one_or_two[i] = (one_or_two[i-1] + one_or_two[i-2]) % mod
if m == 0:
    print(one_or_two[n])
    exit()
ans = 1
if a[0] > 1:
    ans *= one_or_two[a[0]-1]
for i in range(1, m):
    if a[i] - a[i-1] == 2:
        continue
    if a[i] - a[i-1] == 1:
        ans = 0
        break
    ans *= one_or_two[a[i] - a[i-1] - 2]
    ans %= mod
if n - a[-1] > 1:
    ans *= one_or_two[n - a[-1] - 1]
print(ans % mod)
N = int(input())

dic = {}
for _ in range(N):
    A = input()
    if A in dic:
        dic[A] += 1
    else:
        dic[A] = 1

dic_sorted = sorted(dic.items(), key=lambda x:x[1], reverse = True)
ans = []
flag = 0
num = 0
for i in range(N):
    if dic_sorted[i][1] < flag:
        break
    else:
        flag = dic_sorted[i][1]
        ans.append(dic_sorted[i][0])
        num += 1

ans.sort()
for i in range(num):
    print(ans[i])

### FIXED CODE ###

N = int(input())

dic = {}
for _ in range(N):
    A = input()
    if A in dic:
        dic[A] += 1
    else:
        dic[A] = 1

dic_sorted = sorted(dic.items(), key=lambda x:x[1], reverse = True)
ans = []
flag = 0
for i in range(len(dic_sorted)):
    if dic_sorted[i][1] < flag:
        break
    else:
        flag = dic_sorted[i][1]
        ans.append(dic_sorted[i][0])

ans.sort()
for i in range(len(ans)):
    print(ans[i])
N, Q = map(int, input().split())
jun_lis = [[] for i in range(N)]
gyaku_lis = [[] for i in range(N)]
plus_lis = [0] * N
for i in range(N-1):
  a,b = map(int, input().split())
  jun_lis[a-1].append(b-1)
  gyaku_lis[b-1].append(a-1)
for i in range(Q):
  p,x = map(int, inpu().split())
  plus_lis[p-1] += x
ans_lis = [0]*N
ans_lis[0] = plus_lis[0]
for i in range(1,N):
  ans_lis[i] = ans_lis[gyaku_lis[i]] + plus_lis[i]
print(*ans_lis)


### FIXED CODE ###

import sys

sys.setrecursionlimit(10**6)
readline = sys.stdin.readline

def dfs(fr, now, num):
    global graph, addsum, ans
    tmp = num + addsum[now]
    for a in graph[now]:
        if a == fr:
            continue
        dfs(now, a, tmp)
    ans[now] = tmp


def main():
    global graph, addsum, ans
    N, Q = map(int, readline().split())
    graph = [[] for _ in range(N)]
    for _ in range(N-1):
        a, b = map(int, readline().split())
        a -= 1; b -= 1
        graph[a].append(b)
        graph[b].append(a)
    addsum = [0]*N
    for _ in range(Q):
        p, x = map(int, readline().split())
        p -= 1
        addsum[p] += x
    
    ans = [0]*N
    dfs(-1, 0, 0)

    print(*ans)


if __name__ == "__main__":
    main()
N = int(input())
sum = 0.0
sum = float(sum)
for i in range(N):
    x,u = map(float,input().split())
    if u == 'BTC':
        x *= 380000.0
    sum += x
print(sum)

### FIXED CODE ###

N = int(input())
sum = 0.0
for i in range(N):
    x,u = input().split()
    x = float(x)
    if u == 'BTC':
        x *= 380000.0
    sum += x
print(sum)
x = list(map(int, xin))

a = x[0]*2 - x[1]/2
b = -x[0]/2 + x[1]/2

if a>=0 and b>= 0:
	print("yes")
else:
	print("no")

### FIXED CODE ###

xin = input().split()
x = list(map(int, xin))

a = x[0]*2 - x[1]/2
b = -x[0] + x[1]/2

if (a>=0 and b>= 0):
	if(a.is_integer() and b.is_integer()):
		print("Yes")
	else:
		print("No")
else:
	print("No")
n = int(input())
a = list(map(int,input().split()))
m = 0
ans= []
for i in reversed(range(n)):
  z = 0
  for a in ans:
    if a%(i+1)==0:
      z += 1
  if (z+a[i])%2==1:
    ans.append(i+1)
    m+= 1
  else:
    pass
print(m)
print(*ans)
    
  



### FIXED CODE ###

n = int(input())
A = list(map(int,input().split()))
ans= []
B = [0]*n
for i in reversed(range(n)):
  if sum(B[i::i+1])%2!=A[i]:
    ans.append(i+1)
    B[i]+= 1
print(len(ans))   
print(*ans)
N = int(input())
if 7 in N:
  print("Yes")
else:
  print('No')

### FIXED CODE ###

N = input()
if '7' in N:
  print('Yes')
else:
  print('No')
n = int(input())

edges = [[] for i in range(n)]
distance = [-1 for i in range(n)]

for i in range(n-1):
	f,t,c = map(int,raw_input().split())

	f -= 1
	t -= 1

	edges[f].append([t,c])
	edges[t].append([f,c])

q,k = map(int,raw_input().split())
k -= 1

def dfs(v,c):
	if distance[v] == -1:
		distance[v] = c
		for to,cost in edges[v]:
			print to,cost
			dfs(to,c+cost)

dfs(k,0)

for i in range(q):
	x,y = map(int,raw_input().split())
	x -= 1
	y -= 1
	print distance[x] + distance[y]


### FIXED CODE ###

import sys

sys.setrecursionlimit(10**5+100)
n = int(input())

edges = [[] for _ in xrange(n)]
distance = [-1 for _ in xrange(n)]

for _ in xrange(n-1):
	f,t,c = map(int,raw_input().split())

	f -= 1
	t -= 1

	edges[f].append((t,c))
	edges[t].append((f,c))

q,k = map(int,raw_input().split())
k -= 1

def dfs(v,c):
	if distance[v] == -1:
		distance[v] = c
		for to,cost in edges[v]:
			dfs(to,c+cost)

dfs(k,0)

for _ in xrange(q):
	x,y = map(int,raw_input().split())
	x -= 1
	y -= 1
	print distance[x] + distance[y]
n,m = map(int,input().split)
print("Yes" if m==n else "No")

### FIXED CODE ###

n,m = map(int,input().split())
print("Yes" if m==n else "No")
while 1:
    n=int(input())
    if n==0:break
    x=y=10
    b=[list(map(int,input().split())) for _ in range(n)]
    print(b)
    for i,j in [input().split() for _ in range(int(input()))]:
        for _ in range(int(j)):
            if 'N'<=i<='S': y+=1 if i=='N' else -1
            else: x+=1 if i=='E' else -1
            if [x,y] in b:del b[b.index([x,y])]
    print(['Yes','No'][len(b)])

### FIXED CODE ###

while 1:
    n=int(input())
    if n==0:break
    x=y=10
    b=[list(map(int,input().split())) for _ in range(n)]
    for i,j in [input().split() for _ in range(int(input()))]:
        for _ in range(int(j)):
            if 'N'<=i<='S': y+=1 if i=='N' else -1
            else: x+=1 if i=='E' else -1
            if [x,y] in b:del b[b.index([x,y])]
    print(['Yes','No'][bool(b)])
for i in range(n):
    nm[i]=list(set(nm[i]))
visited=[0]*(n+1)
count=0
for i in range(n):
    if visited[i]==0:
        stack=[]
        stack.append(i)
        visited[i]+=1
        temp=1
        while stack:
            x=stack.pop()
            
            for j in nm[x]:
                if visited[j]==0:
                    visited[j]+=1
                    stack.append(j)
                    temp+=1
        count=max(temp,count)
print(count)

### FIXED CODE ###

from collections import deque
n,m=map(int,input().split())
nm=[[] for _ in range(n+1)]
for i in range(m):
    a,b=map(int,input().split())
    nm[a].append(b)
    nm[b].append(a)
for i in range(n):
    nm[i]=list(set(nm[i]))
visited=[0]*(n+1)
count=0
for i in range(n):
    if visited[i]==0:
        stack=deque()
        stack.append(i)
        visited[i]+=1
        temp=1
        while stack:
            x=stack.pop()
            
            for j in nm[x]:
                if visited[j]==0:
                    visited[j]+=1
                    stack.append(j)
                    temp+=1
        count=max(temp,count)
print(count)
n = int(input())
s = input()

if n % 2:
  pirnt("No")
  exit()
  
half = s[0:n // 2]
print("Yes" if s == half + half else "No")

### FIXED CODE ###

n = int(input())
s = input()
if n % 2:
    print("No")
    exit()
half = s[0:n // 2]
print("Yes" if s == half + half else "No")
n, k= map(int,input().split())
l = list(map(int,input().split()))
checkNum=[i for i in range(11)]
for i in l:
    checkNum[find(i)]=checkNum[find(i+1)]
def find(x):
    while x!=checkNum[x]:
        checkNum[x]=checkNum[checkNum[x]]
        x=checkNum[x]
    return x
fin=""
remain=0

if n==0:
    fin=str(find(0))

while n>0 or remain>0:
    last=n%10
    k=find(last+remain)
    remain=0
    if k!=10:
        fin=str(k)+fin
    else:
        remain+=1
        fin=str(find(0))+fin
    n//=10
print(fin)
        


### FIXED CODE ###

n, k= input().split()
l = list(map(int,input().split()))
checkNum=[i for i in range(11)]

def find(x):
    while x!=checkNum[x]:
        checkNum[x]=checkNum[checkNum[x]]
        x=checkNum[x]
    return x

for i in l:
    checkNum[find(i)]=checkNum[find(i+1)]

fin=""
for i in range(len(n)):
    first=int(n[i])
    k=find(first)
    if k==first:
        fin+=str(k)
    else:
        if k!=10:
            fin=str(k)+str(find(0))*(len(n)-i-1)
        else:
            fin=str(find(1))+str(find(0))*len(n)
        break

print(fin)
n, m = [int(x) for x in input().split()]
img_a = []
img_b = []

for i in range(n):
    img_a.append(input())

for i in range(m):
    img_b.append(input())

ans = "No"
for a in range(n - m + 1):
    dup_a = img_a.copy()
    dup_b = img_b.copy()
    while True:
        for b in range(m):
            if dup_b[b] in dup_a[b+a]:
                if b == 0:
                    index = dup_a[a].index(dup_b[0])
                current_index = dup_a[b+a].index(dup_b[b])
                if current_index == index:
                    continue
                elif current_index > index:
                    for line in dup_a:
                        del line[:current_index]
                    break
                else:
                    for line in dup_a:
                        del line[:index]
                    break
            else:   # if not substring in string.
                break
        
        if not dup_b[b] in dup_a[b+a]:
            break

        # if not loop broken.
        ans = "Yes"
        break
        

print(ans)

### FIXED CODE ###

n, m = [int(x) for x in input().split()]
img_a = []
img_b = []

for i in range(n):
    img_a.append(input())

for i in range(m):
    img_b.append(input())

ans = "No"
for a in range(n - m + 1):
    border = 0
    flag = True
    while flag:
        for b in range(m):
            if img_b[b] in img_a[b+a][border:]:
                if b == 0:
                    index = img_a[a].index(img_b[0], border)
                current_index = img_a[b+a].index(img_b[b], border)
                if current_index == index:
                    continue
                elif current_index > index:
                    border = current_index
                    break
                else:
                    border = index
                    break
            else:   # if not substring in string.
                flag = False
                break

        else: # if not loop broken.
            ans = "Yes"
            break
        

print(ans)
dat =list(input().split())

for i in dat:
	i = int(i)

dat.sort()
dat.reverse()

asum = 0
bsum = 0

for i in range(len(dat)):
	if i%2==0:
		asum = asum + dat[i]
	else:
		bsum = bsum + dat[i]
		
print(asum-bsum)

### FIXED CODE ###

n = int(input())
dat = list(input().split())

dat = list(map(int,dat))

dat.sort(reverse=True)

asum = 0
bsum = 0

for i in range(n):
	if i % 2 == 0:
		asum = asum + dat[i]
	else:
		bsum = bsum + dat[i]
		
print(asum-bsum)
# -*-coding: utf-8

while True:
   a = map(int,raw_input().split())
   
   print('#'*a[1])
   for i in range(a[0]-2):
      b = a[1]-2
      print('#''*'*b'#')
   print('#'*a[1])


### FIXED CODE ###

# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   print('#'*a[1])
   for i in range(a[0]-2):
      b ='.'*(a[1]-2)
      print('#'+b+'#')
   print('#'*a[1])
   print('')
s=input()
n=len(s)
def T(i):
    if i==n-1:
        return int(s[n-1])
    return T(i+1)+10**(n-1-i)*int(s[i])
dict={}
def modi(i,dict):
    if i in dict.keys():
        return dict[i]
    else:
        if i==n-1:
            dict[i]=int(s[i])
            return int(s[i])
        else:
            c=modi(i+1,dict)+(10**(n-1-i)*int(s[i]))
            c=c%2019
            dict[i]=c
            return c

modnum={}
for i in range(n):
    #print(T(i))
    x=modi(i,dict)
    #print(T(i),x)
    if x not in modnum.keys():
        modnum[x]=1
    else:
        modnum[x]+=1
sum=0
for md in modnum.keys():
    a=modnum[md]
    if md==0:
        sum+=a
   # print(a*(a-1)//2)
    sum+=a*(a-1)//2
print(sum)

### FIXED CODE ###

import sys
import collections as coun
sys.setrecursionlimit(10000000)
s=input()
n=len(s)
def mod10(x):
    return (10**(x%224))%2019
dp=[-1]*n
tmp=0
for i in reversed(range(n)):
    if i==n-1:
        dp[i]=int(s[i])
    else:
        dp[i]=(dp[i+1]+int(s[i])*pow(10,n-1-i,2019))%2019

#print(dp)
p=-1
for i in range(len(dp)-1):
    if dp[i]==dp[i+1]:
        dp[i]=p
        p=p-1

#print(dp)

c=coun.Counter(dp)
sum=0
for v in c.values():
    sum+=v*(v-1)//2
#print(sum)
for i in dp:
    if i==0:
        sum+=1
#print(sum)
if dp[-1]==0:
    sum=sum-1
print(sum)
from decimal import *
getcontext().prec = 28
a, b, c = map(int, input().split())
a = Decimal(str(a))
b = Decimal(str(b))
c = Decimal(str(c))

if a.sqrt() + b.sqrt() < c.sqrt()):
  print("Yes")
else:
  print("No")


### FIXED CODE ###

from decimal import *
a, b, c = map(int, input().split())
a = Decimal(str(a))
b = Decimal(str(b))
c = Decimal(str(c))
if a.sqrt() + b.sqrt() < c.sqrt():
  print("Yes")
else:
  print("No")
import sys

N = int(input())
A = [int(i) for i in input().split()]
A.sort()

if N % 2 != 0:
    if A[0] == 0:
        a = A[1:]
        j = 1
        k = 0
        for i in range(0, N//2 + 1, 2):
            if a[k] == a[k+1] == 2*j:
                j += 1
                k += 2
            else:
                print(0)
                sys.exit()
        print((2**(N//2)) % (10**9+7))
        
    else:
        print(0)
else:
    j = 1
    k = 0
    for i in range(0, N//2 + 1, 2):
        if A[k] == A[k+1] == 2*j -1:
            j += 1
            k += 2
        else:
            print(0)
            sys.exit()
    print((2**(N//2)) % (10**9+7))

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
ans = 1
if N % 2 == 0:
    if len(A) != 2*len(set(A)):
        ans = 0
else:
    if A.count(0) == 1:
        A.remove(0)
        if len(A) != 2*len(set(A)):
            ans = 0
    else:
        ans = 0
if ans == 0:
    print(0)
else:
    print((2**(N//2))%(10**9+7))
#!/usr/bin/env python3


def prime(t):
    i=2
    while i**2<=t:
        if t%i==0: return 0
        i+=1
    return 1

mod=10**9+7

p=[]
for i in range(2,1008):
    if prime(i):
        p.append(i)

d={i:0 for i in p}
n=int(input())

tmp=1
for i in range(1,n+1):
    tmp*=i
    for j in p:
        while tmp%j==0:
            d[j]+=1
            tmp//=j
        if tmp<j: break
 
for i in d:
    ans*=d[i]+1
    ans%=mod
print(ans)


### FIXED CODE ###

#!/usr/bin/env python3


def prime(t):
    i=2
    while i**2<=t:
        if t%i==0: return 0
        i+=1
    return 1

mod=10**9+7

p=[]
for i in range(2,1008):
    if prime(i):
        p.append(i)

d={i:0 for i in p}
n=int(input())

ans=tmp=1
for i in range(1,n+1):
    tmp*=i
    for j in p:
        while tmp%j==0:
            d[j]+=1
            tmp//=j
        if tmp<j: break

for i in d:
    ans*=d[i]+1
    ans%=mod
print(ans)
def knapsack(wt,price,n,c,dp):
    if n<0 or c==0:
        return 0
    if dp[n][c]!=-1:
        return dp[n][c]
    inc=exc=0
    if c>=wt[n]:
        inc=price[n]+knapsack(wt,price,n-1,c-wt[n],dp)
    exc=0+knapsack(wt,price,n-1,c,dp)
    dp[n][c]=max(inc,exc)
    return max(inc,exc)

n,c=map(int,input().split())
wt=[]
price=[]
for _ in range(n):
    w,v=map(int,input().split())
    wt.append(w)
    price.append(v)
dp=[[-1 for x in range(c+1)] for y in range(n+1)]
print(knapsack(wt,price,n-1,c,dp))

### FIXED CODE ###

def knapsackBottomUp(wt,price,c,n):
    dp=[[0 for x in range(c+1)] for y in range(n+1)]
    for i in range(n+1):
        for w in range(c+1):
            if i==0 or w==0:
                dp[i][w]=0
            else:
                inc=exc=0
                if wt[i-1]<=w:
                    inc=price[i-1]+dp[i-1][w-wt[i-1]]
                exc=dp[i-1][w]
                dp[i][w]=max(inc,exc)
    
    return dp[n][c]
  
n,c=map(int,input().split())
wt=[]
price=[]
for _ in range(n):
    w,v=map(int,input().split())
    wt.append(w)
    price.append(v)
print(knapsackBottomUp(wt,price,c,n))
ist=[]
starting = 400
for I in range(400,2001):
    list.append(starting)
    starting += 1
n=int(input(""))
for I in list:
    if(n>=400 and n<=599):
        print("8")
        break
    elif(n>=600 and n<=799):
        print("7")
        break
    elif(n>=800 and n<=999):
        print("6")
        break
    elif(n>=1000 and n<=1199):
        print("5")
        break
    elif(n>=1200 and n<=1399):
        print("4")
        break
    elif(n>=1400 and n<=1599):
        print("3")
        break
    elif(n>=1600 and n<=1799):
        print("2")
        break
    elif(n>=1800 and n<=1999):
        print("1")
        break

### FIXED CODE ###

n=int(input(""))
if(n>=400 and n<=599):
        print("8")
elif(n>=600 and n<=799):
        print("7")
       
elif(n>=800 and n<=999):
        print("6")
       
elif(n>=1000 and n<=1199):
        print("5")
        
elif(n>=1200 and n<=1399):
        print("4")
       
elif(n>=1400 and n<=1599):
        print("3")
       
elif(n>=1600 and n<=1799):
        print("2")
        
elif(n>=1800 and n<=1999):
        print("1")