Harryxun/stf_run huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

ll m = 1e9 + 7;
ll powm(ll b, ll p)
{
  if (p == 0)
  return 1;
  if (p % 2 == 1)
  return b * powm(b, p - 1) % m;
  else
  {
    ll t = powm(b, p / 2);
    return t * t % m;
  }
}
int main()
{
  int n;
  cin >> n;
  vector<int> a(n);
  map<int, int> flcm;
  vector<map<int, int>> b(n);
  for (int i = 0; i < n; i++)
  cin >> a[i];

  for (int i = 0; i < n; i++)
  {
    int t = a[i];
    for (ll j = 2; j * j <= t; j++)
    {
      while (t % j == 0)
      {
        b[i][j] += 1;
        t /= j;
      }
      if (b[i][j] > flcm[j])
      flcm[j] = b[i][j];
    }
    if (t != 1)
    {
      b[i][t]++;
      if (flcm[t] == 0)
      flcm[t] = 1;
    }
  }
  ll ans = 0;
  ll lcm = 1;
  for (auto x : flcm)
  {
    lcm = lcm * powm(x.first, x.second) % m;
  }
  for (int i = 0; i < n; i++) {
  	ans += lcm * powm(a[i], m - 2) % m;
  }
  cout << ans << endl;
}

### FIXED CODE ###

def gcd(a, b):
    return a if b == 0 else gcd(b, a % b)
def lcm(a, b):
    return a // gcd(a, b) * b

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

l = 1
for i in a:
    l = lcm(l, i)

ans = 0
for i in a:
    ans += l // i

print(ans % 1000000007)
def norm(x1, y1, x2, y2):
    return ((x1-x2)**2 + (y1-y2)**2)**0.5
def d(a, b, c, x, y):
    return abs(a*x + b*y + c) / (a**2 + b**2)**0.5
def points2line(x1, y1, x2, y2):
    la = y1 - y2
    lb = x2 - x1
    lc = x1 * (y2 - y1) + y1 * (x1 - x2)
    return la, lb, lc
from numpy import argmax

x1, y1 = map(int, input().split())
x2, y2 = map(int, input().split())
x3, y3 = map(int, input().split())

a = norm(x3, y3, x2, y2)
b = norm(x1, y1, x3, y3)
c = norm(x1, y1, x2, y2)

xc = (a*x1 + b*x2 + c*x3)/(a+b+c)
yc = (a*y1 + b*y2 + c*y3)/(a+b+c)

iw = argmax([a, b, c])
w = [a, b, c][int(iw)]

L = [[x1, y1], [x2, y2], [x3, y3]]
del L[int(iw)]
h = d(*points2line(*L[0], *L[1]), xc, yc)
print(w*h/(2*h + w))


### FIXED CODE ###

def norm(x1, y1, x2, y2):
    return ((x1-x2)**2 + (y1-y2)**2)**0.5
def d(a, b, c, x, y):
    return abs(a*x + b*y + c) / (a**2 + b**2)**0.5
def points2line(x1, y1, x2, y2):
    la = y1 - y2
    lb = x2 - x1
    lc = x1 * (y2 - y1) + y1 * (x1 - x2)
    return la, lb, lc
from numpy import argmax
#def argmax(L):
#    return max(enumerate(L), key=lambda x: x[1])[0]

x1, y1 = map(int, input().split())
x2, y2 = map(int, input().split())
x3, y3 = map(int, input().split())

a = norm(x3, y3, x2, y2)
b = norm(x1, y1, x3, y3)
c = norm(x1, y1, x2, y2)

xc = (a*x1 + b*x2 + c*x3)/(a+b+c)
yc = (a*y1 + b*y2 + c*y3)/(a+b+c)

iw = argmax([a, b, c])
w = [a, b, c][int(iw)]

L = [[x1, y1], [x2, y2], [x3, y3]]
del L[int(iw)]
m, n = L[0]
p, q = L[1]
s, t, u = points2line(m, n, p, q)
h = d(s, t, u, xc, yc)
print(w*h/(2*h + w))
n=int(input())
if n%2==:
  print(n/2)
else:
  print(int(n/2)+1)  

### FIXED CODE ###

n=int(input())
if n%2==0:
  print(int(n/2))
else:
  print(int((n+1)/2))
import numpy as np
from scipy.ndimage.interpolation import shift

N, A = list(map(int, input().split()))
X = list(map(int, input().split()))

dp = [np.array([[0]*(N*A+1) for _ in range(N+1)])]
#dp[0]: [0][0]～[N][N*A]

for x in X:
  new_dp = dp[-1] + shift(dp[-1], [1, x], cval=0)
  new_dp[1][x] += 1
  
  dp.append(new_dp)
#print(dp[-1])
  
print(sum([dp[-1][i][i*A] for i in range(1, N+1)]))



### FIXED CODE ###

import numpy as np

N, A = list(map(int, input().split()))
X = list(map(int, input().split()))

dp = [np.array([[0]*(N*A+1) for _ in range(N+1)])]
#dp[0]: [0, 0]～[N, N*A]

for x in X:
  new_dp = dp[-1].copy()
  new_dp[1:, x:] += dp[-1][0:N, 0:N*A+1-x]
  if x<=N*A:
    new_dp[1, x] += 1
  
  dp.append(new_dp)
#print(dp[-1])
  
print(sum([dp[-1][i, i*A] for i in range(1, N+1)]))
s=str(input())
l=[]
for i in range(len(s)):
  if s[i]=='A':
    l.append('T')
  if s[i]=='T':
    l.append('A')
  if s[i]=='G':
    l.append('C')
  if l[i]=='C':
    l.append('G')
print(''.join(l))


### FIXED CODE ###

s=str(input())
l=[]
for i in range(len(s)):
  if s[i]=='A':
    l.append('T')
  if s[i]=='T':
    l.append('A')
  if s[i]=='G':
    l.append('C')
  if s[i]=='C':
    l.append('G')
print(''.join(l))
import itertools
li = []
for i in range (n):
    li.append(sorted(list(input())))
li.sort()

def comb(x,y):
    d = itertools.combinations(x,y)
    return len(list(d))

cnt = 0
a = []
for i in range(n-1):
    if li[i] == li[i+1]:
        a.append(i+1)
        if i == n-2:
            a.append("1")
            cnt += comb(a,2)
        
    else: 
        a.append("1")
        cnt += comb(a,2)
        a = []
print(cnt)

### FIXED CODE ###

n = int(input())
from collections import Counter
li = []
for i in range (n):
    li.append(sorted(input()))
li.sort()
for i in range(n):
    li[i]="".join(li[i])

d = Counter(li)
L = list(d.values())

cnt = 0
for i in range(len(L)):
    cnt += L[i]*(L[i]-1)//2
print(cnt)
n = int(input())
lst = map(str, input().split())
res = 0
while True:
  for i in lst:
    if int(i[-1]) % 2 == 1:
      return res
  lst = [int(j) / 2 for j in lst]
  res += 1

### FIXED CODE ###

import sys
n = int(input())
lst = list(map(int, input().split()))
res = 0
for p in range(200):
  for i in range(n):
    if lst[i] % 2 == 1:
      print(res)
      sys.exit()
  lst = [int(j / 2) for j in lst]
  res += 1
for i in range(n):
    x1,y1,x2,y2,x3,y3=map(float, input().split())
    x4,y4=0.5*(x2+x3), 0.5*(y2+y3)
    xg,yg=2/3*(2*x1+x4), 2/3*(2*y1+y4)
    xo,yo=(x1+x2+x3)/3, (y1+y2+y3)/3
    r=((xo-x1)**2+(yo-y1)**2)**0.5
    print(xg, yg, r)

### FIXED CODE ###

def pp(x):
    if x==0:
        x=0
    return "{0:.3f}".format(round(x,3))


n=int(input())
for i in range(n):
    x1,y1,x2,y2,x3,y3=map(float, input().split())

    a=2*(x2-x1)
    b=2*(y2-y1)
    c=( x2**2 + y2**2 ) - ( x1**2 + y1**2 )
    d=2*(x3-x1)
    e=2*(y3-y1)
    f=( x3**2 + y3**2 ) - ( x1**2 + y1**2 )
    x=(c*e-b*f)/(a*e-b*d)
    y=(a*f-c*d)/(a*e-b*d)
    r=( (x-x1)**2 + (y-y1)**2 )**0.5
 
    print(pp(x), pp(y), pp(r))
k = input('enter:')
target = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(traget[k])

### FIXED CODE ###

k = int(input())
# if k <= 0 or k >=33:
#     exit()
target = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(target[k-1])
N, K = map(int, input().split())
S = str(input())
S_list = []
cum_list = [0]
tmp = 1
count = 0
for i in range(N):
    if i == 0:
        if int(S[i]) == tmp:
            count += 1
        else:
            S_list.append(count)
            count = 1
    else:
        if S[i] == S[i - 1]:
            count += 1
            if i == N - 1:
                S_list.append(count)
        else:
            S_list.append(count)
            count = 1


if S[-1] == "0":
    S_list.append(0)




now = 0
for i in range(len(S_list)):
    now += S_list[i]
    cum_list.append(now)
def check(x,K):
    answer_list = []
    i = 0
    if i + 2 * K + 1 < len(x):
        while i + 2 * K + 1 < len(x):
            answer_list.append(x[i + 2 * K + 1] - x[i])
            i += 2
        return answer_list
    elif K > 0:
        check(x,K-1)
        
    
    
answer_list = check(cum_list,K)
if answer_list == None:
    answer_list = [1]
answer = max(answer_list)
print(answer)

### FIXED CODE ###

N, K = map(int, input().split())
S = str(input())
S_list = []
cum_list = [0]
tmp = 1
count = 0

for i in range(N):
    if i == 0:
        if int(S[i]) == tmp:
             count += 1
        else:
            S_list.append(count)
            count = 1
    else:
        if S[i] == S[i - 1]:
            count += 1
            
        else:
            S_list.append(count)
            count = 1

S_list.append(count)
if S[-1] == "0":
    S_list.append(0)


now = 0
for i in range(len(S_list)):
    now += S_list[i]
    cum_list.append(now)


answer_list = []
i = 0
if 2 * K + 1 < len(cum_list):
    while i + 2 * K + 1 < len(cum_list):
        answer_list.append(cum_list[i + 2 * K + 1] - cum_list[i])
        i += 2
else:
    answer_list.append(len(S))
answer = max(answer_list)
print(answer)
tri_list = []
n =  int(input())
for i in range(n):
    #tri_list = list(map(int,input().split(" ")))
    k = int(input())
    tri_list = list(k.split(" "))
    tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")


### FIXED CODE ###

n =  int(input())
for i in range(n):
    tri_list = list(map(int,input().split(" ")))
    tri_list.sort()
    a = int(tri_list[2]) ** 2
    b = int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2
    if a == b:
        print("YES")
    else:
        print("NO")
n,m=map(int,input().split())
data=list(range(n))
cnt=n-1
def find(x):
    if data[x]==x:
        return x
    else:
        find(data[x])
for i in range(m):
    a,b=map(int,input().split())
    a=find(a-1)
    b=find(b-1)
    if a!=b:
        data[a]=b
        cnt-=1
print(cnt)

### FIXED CODE ###

n,m=map(int,input().split())
data=list(range(n))
cnt=n-1
def find(x):
    if data[x]==x:
        return x
    else:
        data[x]=find(data[x])
        return data[x]
for i in range(m):
    a,b=map(int,input().split())
    a=find(a-1)
    b=find(b-1)
    if a!=b:
        data[a]=b
        cnt-=1
print(cnt)
from functools import reduce
import operator
import heapq
def SME(start,end):
    A = []
    if end > N : end = N
    count = 0
    for i,x in enumerate(Whole[start:end]):
        heapq.heappush(A,[x,i])
    for j in range(start,end):
        a = heapq.heappop(A)
        
        if reduce(operator.mul,A[a[1]:a[1]+L])!=0 : continue
        for i in range(L):
            idx = a[1] + i
            try :
                if ANS[idx] == INIT:
                    ANS[idx] = a[0]
                    count += 1
            except IndexError : continue
        if count > N * parameter : break
    for i in range(L):
        if ANS[i] == INIT : ANS[i] = min(Whole[:i+1])
    for i in range(L,N):
        if ANS[i] == INIT : ANS[i] = min(Whole[i+1-L:i+1])
    return ANS

[N,L] = [int(x) for x in input().split()]
Whole = [int(x) for x in input().split()]
parameter = 0.995
INIT = 0
ANS = [INIT]*N
ANS = SME(0, N)
for i in ANS[L-1:-1]:print(i, end=" ")
print(ANS[-1])

### FIXED CODE ###

def ascend(a,b):
    mini = min(A[a:a+L])
    ans[a] = mini
    for i in range(a+1,b):
        if A[i+L-1] <= mini : mini = A[i+L-1]
        elif A[i-1] == mini : mini = min(A[i:i+L])
        ans[i] = mini

def descend(a,b):
    mini = min(A[b-1:b+L-1])
    ans[b-1] = mini
    for i in range(b-2,a-1,-1):
        if A[i] <= mini : mini = A[i]
        elif A[i+L] == mini: mini = min(A[i:i+L])
        ans[i] = mini
    
[N,L] = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
ans = [None]*(N-L+1)
count = 0;
if N > 10 ** 4:
    for i in range(100):
        if A[i+1] > A[i] : count += 1
    if count > 80 : descend(0, N-L+1)
    else : ascend(0,N-L+1)
else :
    ascend(0, N-L+1)
for i in ans[:-1] : print(i, end=" ")
print(ans[-1])
n = int(input())
x=1
a=list(map(int,input().split(" ")))
for i in a:
	x=x*i
    if(x==0):
		break
	if(x>=1000000000000000000):
		break
if(x<=1000000000000000000):
	print(x)
else:
	print(-1)

### FIXED CODE ###

n = int(input())
x=1
a=list(map(int,input().split(" ")))
if(0 in a):
	print(0)
else:
	for i in a:
		x=x*i
		if(x==0):
			break
		if(x>=1000000000000000000):
			break
	if(x<=1000000000000000000):
		print(x)
	else:
		print(-1)
N,X = (int(input().split())
m = []
for i in range(N):
  m.append()
m_min = min(m)
print( ( (X-sum(m))//m_min) + 3)

### FIXED CODE ###

N,X = (int(_) for _ in input().split() )
m = []
for i in range(N):
  m.append(int(input()))
m_min = min(m)
print( ( (X-sum(m))//m_min) + N)
L=[	7151,8111,8741,8431,9241,11, 31, 41, 61, 71, 101, 131, 151, 181, 191, 211, 241, 251, 271, 281, 311, 331, 401, 421, 431, 461, 491, 521, 541, 571, 601, 631, 641, 661, 691, 701, 751, 761, 811, 821, 881, 911, 941, 971, 991, 1021, 1031, 1051, 1061, 1091, 1151, 1171, 1181, 1201, 1231, 1291]
print(L.join(map(str,[3,4,5][:int(input())])))


### FIXED CODE ###

L=[2,11,31,41,61,71,101,131,151,181,191,211,241,251,271,281,311,331,
  401,421,431,461,491,521,541,571,601,631,641,661,701,751,761,811,821,
  881,911,941,971,991,1021,1031,1051,1061,1091,1151,1171,1181,
  1201,1231,1291, 1301,1321,1361,1381,1451,1471]
N = int(input())
A = []
for i in range(N):
    A.append(L[i])
print(' '.join(map(str, A)))
a=int(input())
lis=list(map(int,input().split()))
lis=sorted(lis)
i=0
while lis[i]<0:
  if lis[i]<=0 and lis[i+1]>=0:
    if -1*lis[i]>lis[i+1]:
      lis[i],lis[i+1]=-lis[i],-lis[i+1]
  elif lis[i]<=0 and lis[i+1]<=0:
    lis[i],lis[i+1]=-lis[i],-lis[i+1]
  i+=2
print(sum(lis))

### FIXED CODE ###

a=int(input())
b=list(map(int,input().split()))
c=list(filter(lambda n:n<=0,b))
c=list(map(lambda n:n*-1,c))
d=list(filter(lambda n:n>0,b))
ans=sum(d)+sum(c)
ansl=c+d
if len(c)%2!=0:  
  ans-=min(ansl)*2
print(ans)
def bubble(A):
    flag = True
    n = len(A)
    i = 0
    while flag:
        flag = False
        for j in range(n-1,i,-1):
           if A[j][1] < A[j-1][1]:
               A[j],A[j-1] = A[j-1],A[j]
               flag = True
        i += 1
 
 
def selection(A):
    n = len(A)
    for i in range(n):
        minj = i
        for j in range(i,n):
            if A[j][1] < A[minj][1]:
                minj = j
        if i != minj:
            A[i],A[minj] = A[minj],A[i]
             
   
           
n = int(input())
ss = [x for x in input().split()]     
ss2 = ss.copy()
 
 
bubble(ss)
for i in range(len(ss)-1):
    print(ss[i], end=' ')
print(ss[-1])
print('Stable')
    
 
selection(ss2)
for i in range(len(ss2)-1):
    print(ss2[i], end=' ')
print(ss2[-1])
if ss == ss2:
    print('Stable')
else:
    print('Not stable')


### FIXED CODE ###

n = int(input())
*A, = input().split()
B = A[:]
for i in range(n):
    for j in range(n-1, i, -1):
        if A[j][1] < A[j-1][1]:
            A[j], A[j-1] = A[j-1], A[j]
print(*A)
print("Stable")
 
for i in range(n):
    minj = i
    for j in range(i, n):
        if B[j][1] < B[minj][1]:
            minj = j
    B[i], B[minj] = B[minj], B[i]
print(*B)
if A == B:
    print("Stable")
else:
    print("Not stable")
N, M = list(map(int, input().split(' ')))
sc = [list(map(int, input().split(' '))) for i in range(M)]


ans_l = [False for i in range(N)]


dup = False
for s, c in sc:
    if (not ans_l[s-1]) or ans_l[s-1] == str(c):
        if s > N or s < 1:
            out = True
            break
        ans_l[s-1] = str(c)
    else:
        dup = True
        break

# ans_l

for ix, x in enumerate(ans_l):
    if x:
        break
    ans_l[ix] = '1'

for ix, x in enumerate(ans_l):
    if x:
        pass
    else:
        ans_l[ix] = '0'

ans_n = int(''.join(ans_l))

ans_final = ans_n
if dup or out:
    ans_final = -1
if len(str(ans_n)) != N:
    ans_final = -1

print(str(ans_final))

### FIXED CODE ###

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

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

def solve():
    global n, m, sc
    for i in range(1000):
        tmp = str(i)
        if len(tmp) != n:
            continue
        check = True
        for s, c in sc:
            if int(tmp[s-1]) != c:
                check = False
        if check:
            return tmp
    return -1
print(solve())
from sys import stdin

n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()

if s.cound("R") > s.count("B"):
    print("YES")
else:
    print("NO")

### FIXED CODE ###

from sys import stdin

n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()

if s.count("R") > s.count("B"):
    print("Yes")
else:
    print("No")
n,m=map(int,input().split())
dp=[[0]*m for i in range(m)]
#me=[[[]*m] for i in range(m)]
he=[[]*m for i in range(m)]
ta=[[]*m for i in range(m)]
ans=0
for i in range(n):
    a,b=map(int,input().split())
    if dp[a-1][b-1]==0:
        dp[a-1][b-1]=1
        he[a-1]+=[b-1]
        ta[b-1]+=[a-1]
    a=a-1
    b=b-1
    for j in he[b]:
        dp[a][j]=max(dp[a][j],dp[b][j]+1)
        ans=max(ans,dp[a][j])
    for j in ta[a]:
        dp[j][b]=max(dp[j][b],dp[j][a]+1)
        ans=max(ans,dp[j][b])
print(ans)
    

### FIXED CODE ###

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

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

visited = [False]*n
calculated = [False]*n
dp = [1]*n# Vからスタートしたときの最長経路。頂点の個数ベースで経路の長さを数えるので、初期値は1

def dfs(v):
    if visited[v]:
        if not calculated[v]:
            return -1 # 計算が終わっていない頂点を2度訪れるのはループがあるということ
        return dp[v]
    visited[v] = True
    for u in to[v]: # 全ての辺をなめる
        res = dfs(u)
        if res == -1: return -1 # ループがあれば-1を返す
        dp[v] = max(dp[v], res+1)
    calculated[v] = True
    return dp[v]

def main():
    for i in range(m):
        a,b=map(int,input().split())
        a-=1
        b-=1
        to[a].append(b)
    ans = 0
    for i in range(n):
        res = dfs(i)
        ans = max(ans, res)
    print(ans-1)
    return

if __name__ == '__main__':
    main()
N,R=input().split()
N=int(N)
R=int(R)
if 1<=N<=9:
    R_exhibit=R-100*(10-N)
    print(R_exhibit)
elif N>=10:
    R_exibit=R
    print(R_exhibit)

### FIXED CODE ###

N,R=input().split()
N=int(N)
R=int(R)
if (R>4111)or(R<0):
  None
if 1<=N<=9:
  R_internal=R+100*(10-N)
  print(R_internal)
elif N>=10:
  R_internal=R
  print(R_internal)
else:
  None
T = list(input())

s = T.count('?')

for i in range(s):
    a = T.index('?')
    if a == 0:
        if T[a+1] == 'D':
            T[a] = 'P'
        else:
            T[a] = 'D'
    else:
        T[a] = 'D'
print(''.join(T))

### FIXED CODE ###

T = input()

T = T.replace('?', 'D')
	
print(''.join(T))
global MOD = 1000000007

def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)

def lcm(a, b):
    return a*b//gcd(a,b)

def main():
    n = int(input())
    a = list(map(int,input().split()))
    all_lcm = a[0]
    for i in range(n):
        all_lcm = lcm(all_lcm, a[i])
    ans = 0
    for i in range(n):
        ans += all_lcm//a[i]
        ans %= MOD
    print(ans)

if __name__ == '__main__':
    main()

### FIXED CODE ###


MOD = 1000000007

def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)

def lcm(a, b):
    return a//gcd(a,b)*b

n = int(input())
a = list(map(int,input().split()))
all_lcm = 1
for i in range(n):
    all_lcm = lcm(all_lcm, a[i])
ans = 0
for i in range(n):
    ans += all_lcm//a[i]
print(ans%MOD)
A, X, C= map(int,input().split())
print(A[0] + X[0] + C[0])

### FIXED CODE ###

Atcoder, s, Contest= map(str, input().split())
print("A" + s[0] + "C")
from collections import deque

n = int(input())
l = deque(sorted(list(map(int, input().split()))))
ans = 0

for _ in range(len(l)-2):
    first = l.pop()
    m = l.copy()
    for _ in range(len(m)-1):
        second = m.pop()
        n = m.copy()
        fix = first - second
        if fix == 0:
            break
        else:
            for _ in range(len(n)):
                third = n.pop()
                if fix < third:
                    ans += 1
                else:
                    break

print(ans)

### FIXED CODE ###

from bisect import bisect_right

n = int(input())
order = sorted(list(map(int, input().split())))
ans = 0

for i in reversed(range(2, n)):
    for j in reversed(range(1, i)):
        ans += j - bisect_right(order[0:j], order[i]-order[j])

print(ans)
A,B = map(int,input())
print(A*B)

### FIXED CODE ###

A,B = map(int,input().split())
print(A*B)
count = 0
n = int(input())
def ifprime(num):
  for i in range(2,num ** 0.5 + 1):
    if num % i:
      continue
    else:
      return False
  return True
for _ in range(n):
  a = int(input())
  if ifprime(a):
    count += 1
print(count)


### FIXED CODE ###

import math
count = 0
n = int(input())

def ifprime(num):
  for i in range(2,math.floor(num ** 0.5) + 1):
    if num % i:
      continue
    else:
      return False
  return True

for _ in range(n):
  a = int(input())
  if ifprime(a):
    count += 1

print(count)
import math

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

aa=a*a
bb=b*b


mm=m*6

hh=h*30+30*m/60
if hh-mm<=180:
    cos = math.cos(math.radians(abs(hh-mm)))
else:
    cos = math.cos(math.radians(360-abs(hh-mm)))
#print(cos)
cc=aa+bb-2*a*b*cos

c=math.sqrt(cc)

print(c)


### FIXED CODE ###

a=input()

if a[-1]=='3':
    print('bon')
elif a[-1]=='0' or a[-1]=='1' or a[-1]=='6' or a[-1]=='8':
    print('pon')
elif a[-1]=='2' or a[-1]=='4' or a[-1]=='5' or a[-1]=='7' or a[-1]=='9':
    print('hon')
n, m = map(int, input().split())
a = sorted([int(i) for i in input().split()])
bc = sorted([tuple(map(int, input().split())) for i in range(m)], key=lambda x: x[1], reverse=True)
i = 0
for b, c in bc:
    while b:
        if a[i] < c:
            a[i] = c
            b -= 1
        else:
            break
        i += 1
print(sum(a))

### FIXED CODE ###

n, m = map(int, input().split())
cards = sorted(list(map(int, input().split())))
ope = [list(map(int, input().split())) for i in range(m)]
ope.sort(key=lambda x: x[1], reverse=True)
i, j, k = 0, 0, 0
while i < n and j < m and cards[i] < ope[j][1]:
    cards[i] = ope[j][1]
    i += 1
    k += 1
    if k >= ope[j][0]:
        j += 1
        k = 0
print(sum(cards))
N = int(input())
S = input()
a = 0
b = S.count('.')
num = min(N - y, y)
for i in range(N):
  x = S[i] =='#'
  a += x
  b -= 1-x
  num = num(num, a+b)
print(num)


### FIXED CODE ###

N = int(input())
S = input()
a = 0
b = S.count('.')
num = min(N - b, b)
for i in range(N):
  x = S[i] =='#'
  a += x
  b -= 1-x
  num = min(num, a+b)
print(num)
a = int(input())
ar = list(map(int,input().split(" ")))
A = 0
B = 0
while len(ar) != 0:
  A += max(ar)
  ar.remove(max(ar))
  B += max(ar)
  ar.remove(max(ar))
print(A - B)

### FIXED CODE ###

a = int(input())
ar = list(map(int,input().split(" ")))
A = 0
B = 0
while True:
  A += max(ar)
  ar.remove(max(ar))
  if len(ar) == 0:
      break
  B += max(ar)
  ar.remove(max(ar))
  if len(ar) == 0:
      break
print(A - B)
x = input().split(' ')
    a = int(x[0])
    b = int(x[1])

    if a > b:
        print('a > b')
    elif a < b:
        print('a < b')
    else:
        print('a == b')
    


### FIXED CODE ###

if __name__ == '__main__':
    x = input().split(' ')
    a = int(x[0])
    b = int(x[1])

    if a > b:
        print('a > b')
    elif a < b:
        print('a < b')
    else:
        print('a == b')
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;



int main(){
    //input    
    int A,B,T;
    cin >> A >> B >> T;
    int ans;
    ans = (T / A)*B;
    cout << ans << endl;
    

    return 0;
}

### FIXED CODE ###

#[A,B,T] = [20,20,19]
[A,B,T] = list(map(int,input().split()))
print((T // A)*B)
import sys

def solve(N, T, A, ls_H):
    dosi = []
    titen = []
    titen1 = []
    ti = 10**5//1
    for x in ls_H :
        do = T - x * 0.006
        dosi.append(do)
    #print(dosi)
    
    for y in dosi :
        ti = A - y
        titen.append(ti)
    #print(titen)
    
    for z in titen :
        titen1.append(abs(z))
    #print(titen1)
    
    for i in titen1 :
        if ti > i :
            ti = i
    #print(ti)
    return titen1.index(ti) + 1


def readQuestion():
    ws = sys.stdin.readline().strip().split()
    N = int(ws[0])
    ws = sys.stdin.readline().strip().split()
    T = int(ws[0])
    A = int(ws[1])
    ws = sys.stdin.readline().strip().split()
    ls_H = list(map(int, ws))
    return (N, T, A, ls_H)

def main():
    print(solve(*readQuestion()))

# Uncomment before submission
main()

### FIXED CODE ###

import sys
 
def solve(N, T, A, ls_H):
    dosi = []
    titen = []
    titen1 = []
    ti = 10**5//1
    for x in ls_H :
        do = T - x * 0.006
        dosi.append(do)
    #print(dosi)
    
    for y in dosi :
        til = A - y
        titen.append(til)
    #print(titen)
    
    for z in titen :
        titen1.append(abs(z))
    #print(titen1)
    
    for i in titen1 :
        if ti > i :
            ti = i
    #print(ti)
    return titen1.index(ti) + 1
 
def readQuestion():
    ws = sys.stdin.readline().strip().split()
    N = int(ws[0])
    ws = sys.stdin.readline().strip().split()
    T = int(ws[0])
    A = int(ws[1])
    ws = sys.stdin.readline().strip().split()
    ls_H = list(map(int, ws))
    return (N, T, A, ls_H)
 
def main():
    print(solve(*readQuestion()))
 # Uncomment before submission
main()