Harryxun/stf_run huggingface dataset:
A,B = map(int, input())
if isinstance(A / B, int):
  print(A + B)
else:
  print(B - A)


### FIXED CODE ###

a,b=map(int,input().split())
print(a+b if b%a==0 else b-a)
S, T = input().split()
a, b = int(input.split())
U = input()
if S == U:
  print(a-1)
else:
  print(b-1)

### FIXED CODE ###

S, T = input().split(" ")
A, B = [int(i) for i in input().split(" ")]
U = input()
 
if S==U :
  print("{} {}".format(A-1,B))
else:
  print("{} {}".format(A,B-1))
for c in C[r:]:
        _counter[c] = _counter.get(c, 0) + 1
    _r = _counter.get(R, 0)

    ans = _r
    print(ans)
if __name__ == '__main__':
    main()


### FIXED CODE ###

from queue import deque
def main():
    R, W = "R", "W"
    N = int(input())
    C = input()

    counter = dict()
    for c in C:
        counter[c] = counter.get(c, 0) + 1
    r = counter.get(R, 0)

    _counter = dict()
    for c in C[r:]:
        _counter[c] = _counter.get(c, 0) + 1
    _r = _counter.get(R, 0)

    ans = _r
    print(ans)
if __name__ == '__main__':
    main()
# -*- coding: utf-8 -*-
D = int(input())
print("Christmas"+"Eve"*(D-25).split())

### FIXED CODE ###

# -*- coding: utf-8 -*-
D = int(input())
print("Christmas " + "Eve "*(25 - D))
import sys

#最大公約数
def gcd(x, y):
    s = x / y
    r = x % y
    if r == 0:
        return y
    else:
        return gcd(y, r)

#最小公倍数
def lcm(x, y):
    return x*y/gcd(x, y)

def main():
    #print ("a")
    tmp = sys.stdin.readline().split(" ")
    #print ("b")
    while 1:
        a = int(tmp[0])
        b = int(tmp[1])
        #print ("a="+str(a))
        #print ("b="+str(b))
        #b = sys.stdin.readline()
        #print ("d")
        if a > b:
            c = a
            d = b
        else:
            c = b
            d = a

        print (str(gcd(c, d)) + " " + str(int(lcm(c,d))))

        tmp = sys.stdin.readline()
        if len(tmp) == 1:
            break
        else:
            tmp = tmp.split(" ")

    #print ("exit")
     
if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys

#最大公約数
def gcd(x, y):
    s = x / y
    r = x % y
    if r == 0:
        return y
    else:
        return gcd(y, r)

#最小公倍数
def lcm(x, y):
    return x*y/gcd(x, y)

def main():
    #print ("a")
    for line in iter(sys.stdin.readline, ""):
        #print (line)
        #tmp = sys.stdin.readline().split(" ")
        #print ("b")
        tmp = line.split(" ")
    
        a = int(tmp[0])
        b = int(tmp[1])
        #print ("a="+str(a))
        #print ("b="+str(b))
        #b = sys.stdin.readline()
        #print ("d")
        if a > b:
            c = a
            d = b
        else:
            c = b
            d = a

        print (str(gcd(c, d)) + " " + str(int(lcm(c,d))))

        #tmp = sys.stdin.readline()
        #if len(tmp) == 1:
        #    break
        #else:
        #    tmp = tmp.split(" ")

    #print ("exit")
     
if __name__ == "__main__":
    main()
H,W = map(int,input().split())
S = []
flag = "Yes"
for i in range(0,H):
    S.append(list(input()))

    
for i in range(0,H):
    for j in range(0,W):
        if S[i][j] == "#":
            if i != 0 and S[i-1][j] == "#" : continue
            elif i != H-1 and S[i+1][j] == "#": continue
            elif j != 0 and S[i][j-1] == "#": continue
            elif j != W-1 and S[i][j+1] == "#":continue
            else flag = "No"
            
print(flag)
          

### FIXED CODE ###

H,W = map(int,input().split())
S = []
flag = "Yes"
for i in range(0,H):
    S.append(list(input()))

    
for i in range(0,H):
    for j in range(0,W):
        if S[i][j] == "#":
            if i != 0 and S[i-1][j] == "#" : continue
            elif i != H-1 and S[i+1][j] == "#": continue
            elif j != 0 and S[i][j-1] == "#": continue
            elif j != W-1 and S[i][j+1] == "#":continue
            else: flag = "No"
            
print(flag)
n,k=map(int,input().split())
ans=0
for i in range(n):
  h=int(input())
  if h>=k:
    ans+1
print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
ans=0
hlist=list(map(int,input().split()))
for height in hlist:
  if height>=k:
    ans+=1
print(ans)
number, max = input().split()

if (int(number) * 500 >= int(max)) {
	print('yes'); 
}
print('no');

### FIXED CODE ###

num, max = input().split()
if (int(num) * 500 >= int(max)):
    print('Yes');
else:
    print('No');
s=input()
x,y=map(int,input().split())
t=s.split("T")
x-=len(t[0])
dx,dy=[],[]

for i,tt in enumerate(t[1:]):
  if i%2==1:
    dx.append(len(tt))
  else:
    dy.append(len(tt))

def is_ok(n,l):
  dp=[[0]*16001 for _ in range(len(l)+1)]
  n+=8000
  dp[0][8000]=1
  for i in range(1,len(l)+1):
    for j in range(16001):
      if j+l[i-1]<=16000:
        dp[i][j+l[i-1]]|=dp[i-1][j]
      if j-l[i-1]>=0:
        dp[i][j-l[i-1]]|=dp[i-1][j]
  if dp[len(l)][n]==1:
    return True
  else:
    return False

if is_ok(abs(x),dx) and is_ok(abs(y),dy):
  print("Yes")
else:
  print("No")




### FIXED CODE ###

s=input()
x,y=map(int,input().split())
t=s.split("T")
x-=len(t[0])
dx,dy=[],[]

for i,tt in enumerate(t[1:]):
  if i%2==1:
    dx.append(len(tt))
  else:
    dy.append(len(tt))

def is_ok(n,l):
  dp=set([0])
  for d in l:
    t=[]
    for v in dp:
      t.append(v+d)
      t.append(v-d)
    dp=set(t)
  return True if n in dp else False

if is_ok(x,dx) and is_ok(y,dy):
  print("Yes")
else:
  print("No")
A,P=map(int,input())
print((A*3+P)//2)

### FIXED CODE ###

A,P=map(int,input().split())
c=(A*3+P)//2
print(c)
n = int(input())
a = list(map(int, input().split()))
ans = 0
s = sum(a)-a[0]
for i in range(n-1):
  ans+=(a[i]*s)
  ans%=st
  s-=a[i+1]
print(ans)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
st=10**9+7
ans = 0
s = sum(a)-a[0]
for i in range(n-1):
  ans+=(a[i]*s)
  ans%=st
  s-=a[i+1]
print(ans)
s,w = int(input())

if s <= w:
  print("unsafe")
else:
  print("safe")

### FIXED CODE ###

s,w = map(int,input().split())
 
if s <= w:
  print("unsafe")
else:
  print("safe")
n=int(input())
li=list(input())
if n%2==0:
  t=int(n/2)
  a=li[:t]
  t=-t
  b=li[t:]
  if a==b:
    print('Yes')
  else:
    print('No')
else:
  print('No')

### FIXED CODE ###

a=int(input())
a=a*a
print(a)
import sys
# Xはもっとも近い整数，Nは与えられるP
X,N = map(int, input().split())

if N == 0:
  print(X)
  sys.exit()

arr = list(map(int, input().split()))
mainasu = X 
purasu = X 

def saiki():
  mainasu - 1
  purasu + 1
  if X in arr:
    if mainasu in arr:
      if purasu in arr:
        saiki()
      else:
        print(purasu)
    else:
      print(mainasu)
  else:
    print(X)

saiki()

### FIXED CODE ###

import sys

def saiki(l,r,lst):
  if (l - 1) not in lst:
      return (l - 1)
  
  if (r + 1) not in lst:
      return (r + 1)
  
  return saiki(l - 1, r + 1, lst)

def main():
  # Xはもっとも近い整数，Nは与えられるP
  X,N = map(int, input().split())

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

  if N == 0:
    print(X)
    sys.exit()

  if X not in arr:
    print(X)
    sys.exit()

  print(saiki(X,X,arr))

if __name__ == '__main__':
    main()
s = raw_input()
k = int(raw_input())


s_l = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

def s_i(st):
    for i in range(26):
        if st == s_l[i]:
            return i + 1
            break

j = 0
while k > 0:
    a = s_i(s[j])
    if s[j] == 'a' and j < len(s)-1:
        pass
    elif 27 - a <= k:
        k = k - (27 - a)
        s = s[:j] + 'a' + s[j+1:]
    elif j == len(s) - 1:
        t = (a+k)%26 - 1
        if t >= 0:
            s = s[:j] + s_l[t]
        else:
            s = s[:j] + s_l[t + 26]
        break
    else:
        pass
    j += 1

print s


### FIXED CODE ###

s = raw_input()
k = int(raw_input())


s_l = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

def s_i(st):
    for i in range(26):
        if st == s_l[i]:
            return i + 1
            break

j = 0
while k > 0 and j <= len(s)-1:
    a = s_i(s[j])
    if s[j] == 'a' and j < len(s)-1:
        pass
    elif 27 - a <= k and j < len(s)-1:
        k = k - (27 - a)
        s = s[:j] + 'a' + s[j+1:]
    elif j == len(s) - 1:
        t = (a+k)%26 - 1
        if t >= 0:
            s = s[:j] + s_l[t]
        else:
            s = s[:j] + s_l[t + 26]
        break
    else:
        pass
    j += 1

print s
S=input()

left=int(S[:2])
right=int(S[2:])

YYMM=True
MMYY=True
AMBIGUOUS=True
NA=True


if leftL<=0 or left>12:
  MMYY=False
  AMBIGUOUS=False
else:
  NA=False
  
if right<=0 or right>12:
  YYMM=False
  AMBIGUOUS=False
else:
  NA=False

if YYMM==True:
  if MMYY==True:
    print("AMBIGOUS")
  else:
    print("YYMM")
else:
  if MMYY==True:
    print("MMYY")
  else:
    print("NA")

### FIXED CODE ###

S=input()

left=int(S[:2])
right=int(S[2:])

YYMM=True
MMYY=True
AMBIGUOUS=True
NA=True


if left<=0 or left>12:
  MMYY=False
  AMBIGUOUS=False
else:
  NA=False
  
if right<=0 or right>12:
  YYMM=False
  AMBIGUOUS=False
else:
  NA=False


if YYMM==True:
  if MMYY==True:
    print("AMBIGUOUS")
  else:
    print("YYMM")
else:
  if MMYY==True:
    print("MMYY")
  else:
    print("NA")
if aa in (2,4,5,7,9):
    print('hon')
    exit()
if aa in (0,1,6,8):
    print('pon')
    exit()
if aa == 3:
    print('bon')
    exit()

### FIXED CODE ###


a = int(input())
x = str(a)
aa = int(x[len(x)-1])

if aa in (2,4,5,7,9):
    print('hon')
    exit()
if aa in (0,1,6,8):
    print('pon')
    exit()
if aa == 3:
    print('bon')
    exit()
n = int(input())
x = input()
ans = [0]*n

popcnt = 0
for i in range(n):
    if x[i] == "1":
        popcnt += 1
if popcnt == 0:
    print("owari")

amari = 0
for i in range(len(x)):
    if x[i] == "1":
        amari += pow(2, len(x)-i-1, popcnt)
amari %= popcnt

print(amari)

### FIXED CODE ###

n = int(input())
x = input()
import copy

memo = [0]*n
ans = [-1]*n
popcnt = 0

for i in range(n):
    if x[i] == "1":
        popcnt += 1

amariStaticA = 0
amariStaticB = 0
aaa = -1
if popcnt == 1:
    for i in range(n):
        if x[i] == "1":
            ans[i] = 0
            aaa = i
            amariStaticB += pow(2, n-i-1, popcnt+1)
    amariStaticB %= popcnt+1
else:
    for i in range(n):
        if x[i] == "1":
            amariStaticA += pow(2, n-i-1, max(1, popcnt-1))
            amariStaticB += pow(2, n-i-1, popcnt+1)
    amariStaticA %= max(1, popcnt-1)
    amariStaticB %= popcnt+1

for i in range(n):
    if popcnt == 1 and i == aaa:
        continue
    if x[i] == "0":
        amari = amariStaticB + pow(2, n-i-1, popcnt+1)
        amari %= popcnt+1
    else:
        amari = amariStaticA - pow(2, n-i-1, max(1, popcnt-1))
        amari %= max(1, popcnt-1)
    if amari == 0:
        ans[i] = 1
    else:
        memo[i] = amari

for i in range(len(memo)):
    cnt = 1
    firstMemo = copy.deepcopy(memo[i])
    while memo[i] != 0:
        popcnt = bin(memo[i]).count("1")
        memo[i] %= max(1, popcnt)
        cnt += 1
        if memo[i] == 0:
            ans[i] = cnt
            break


for anss in ans:
    print(anss)
S = input()
2 print('Heisei' if S <= '2019/04/30' else 'TBD')

### FIXED CODE ###

S = input()
print('Heisei' if S <= '2019/04/30' else 'TBD')
import statistics
N = int(input())
A = list(map(int, input().split()))

for i in range(N):
	A[i] = A[i] - (i+1)
A.sort()

b = statistics.median(A)

ans = 0

for i in range(N):
	ans += abs(A[i] - b)
print(ans

### FIXED CODE ###

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

for i in range(N):
	A[i] = A[i] - (i+1)
A.sort()

if N % 2 == 0:
	med1 = A[N // 2 - 1]
	med2 = A[N //2]
	ans = min(sum([abs(a - med1) for a in A]), sum([abs(a - med2) for a in A]))

else:
	med = A[N // 2]
	ans = sum([abs(a - med) for a in A])
	
print(ans)
N = int(input())
suuretsu_str = input().split()
suuretsu = [int(i) for i in suuretsu_str]
suuretsu_order = [i for i in range(1,N+1)]
count = 0
for i in range(N):
    if suuretsu[i] != suuretsu_order[i]
    count += 1
if count == 2:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

N = int(input())
suuretsu_str = input().split()
suuretsu = [int(i) for i in suuretsu_str]
suuretsu_order = [i for i in range(1,N+1)]
count = 0
for i in range(N):
    if suuretsu[i] != suuretsu_order[i]:
        count += 1
if count == 2 or count == 0:
    print("YES")
else:
    print("NO")
#include <stdio.h>

int main(void) {
    int a, b;

    scanf("%d %d", &a, &b);

    if (a <= b) {
        printf("%d\n", a);
    }
    else {
        printf("%d\n", b);
    }

    return 0;
} 

### FIXED CODE ###

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

if a <= b:
    print(a)
else:
    print(a-1)
a=(input())
b=int(a[0:2])
c=int(a[2:4])
if b==0 or c==o:
  print("NA")
elif b => 12 and c=>12:
  print("NA")
elif b =>12:
  print("YYMM")
elif c=>12:
  print("MMYY")
else:
  print("AMBIGUOUS")

### FIXED CODE ###

A=input()
B=int(A[:2])
C=int(A[2:4])
  
if(1<=B<=12):
    if(1<=C<=12):
        print('AMBIGUOUS')
    else:
        print('MMYY')
elif(1<=C<=12):
    print('YYMM')    
else:
    print('NA')
H = int(input())

memo_count = {}
def searchCount(h):
    if h==1: # 脱出条件
        return 1
    elif h in memo_count:
        return memo_count[h]
    else:
        h_half = int(h / 2)
        memo_count[h] = 1 + 2*searchCount(h_half)
        return memo_count[h]

print(searchCount(H))


### FIXED CODE ###

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

count = 0
while H > 0:
    H = H - A
    count = count + 1

print(count)
n=int(input())
s=[]
t=1000
p=0
def f9(n,p):
    while n>=9:
        n//=9
        p+=1
        f9(n,p)
    return p
def f6(n,p):
    while n>=6:
        n//=6
        p+=1
        f6(n,p)
    return p    
s.append((n,0))
while s:
    a=s[0][0]
    b=s[0][1]
    if a<6:
    t=min(t,b+a)
    if t>=b+1:
        p=0
        s.append((a-9**f9(a,p),b+1))
        p=0
        s.append((a-6**f6(a,p),b+1))
    s.pop(0)    
print(t)




### FIXED CODE ###

n=int(input())
s=[]
t=1000
p=0
def f9(n,p):
    while n>=9:
        n//=9
        p+=1
        f9(n,p)
    return p
def f6(n,p):
    while n>=6:
        n//=6
        p+=1
        f6(n,p)
    return p    
s.append((n,0))
while s:
    a=s[0][0]
    b=s[0][1]
    if a<6:
        t=min(t,b+a)
    if t>=b+1:
        p=0
        s.append((a-9**f9(a,p),b+1))
        p=0
        s.append((a-6**f6(a,p),b+1))
    s.pop(0)    
print(t)
a,b,c = map(int,input().split())
if (a<b&&b<c)||(b<a&&c<b):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a,b,c = map(int,input().split())
if (a<c and c<b) or (c<a and b<c):
  print("Yes")
else:
  print("No")
N, K, L = list(map(int, input().split()))
PQ = [list(map(int, input().split())) for _ in range(K)]
RS = [list(map(int, input().split())) for _ in range(L)]

def uft_root(g, a):
	if g[a] < 0:
		return a
	g[a] = uft_root(g, g[a])
	return g[a]

def uft_size(g, a):
	return -g[uft_root(g, a)]

def uft_merge(g, a, b):
	a, b = uft_root(g, a), uft_root(g, b)
	if a == b:
		return
	size_a, size_b = uft_size(g, a), uft_size(g, b)
	if size_a < size_b:
		a, b = b, a
		size_a, size_b = size_b, size_a
	g[a] -= size_b
	g[b] = a

g_pq = [[] for _ in range(N)]
for p, q in PQ:
	p, q = p - 1, q - 1
	g_pq[p] += [q]
	g_pq[q] += [p]

g_rs = [[] for _ in range(N)]
for r, s in RS:
	r, s = r - 1, s - 1
	g_rs[r] += [s]
	g_rs[s] += [r]

def dfs(v, g, uft, visited):
	if visited[v]:
		return
	visited[v] = True
	for n in g[v]:
		if visited[n]:
			continue
		uft_merge(uft, v, n)
		dfs(n, g, uft, visited)

visited_pq = [False] * N
visited_rs = [False] * N
uft_pq = [-1] * N
uft_rs = [-1] * N

for n in range(N):
	dfs(n, g_pq, uft_pq, visited_pq)
	dfs(n, g_rs, uft_rs, visited_rs)

group_pq, group_rs = {}, {}
for n in range(N):
	root_pq = uft_root(uft_pq, n)
	if not root_pq in group_pq:
		group_pq[root_pq] = {n}
	else:
		group_pq[root_pq] |= {n}
	root_rs = uft_root(uft_rs, n)
	if not root_rs in group_rs:
		group_rs[root_rs] = {n}
	else:
		group_rs[root_rs] |= {n}

for n in range(N):
	print(len(group_pq[uft_root(uft_pq, n)] & group_rs[uft_root(uft_rs, n)]), "", end="")
print()


### FIXED CODE ###

from collections import defaultdict as dd

N, K, L = list(map(int, input().split()))
PQ = [list(map(int, input().split())) for _ in range(K)]
RS = [list(map(int, input().split())) for _ in range(L)]

def uft_root(g, a):
	if g[a] < 0:
		return a
	g[a] = uft_root(g, g[a])
	return g[a]

def uft_size(g, a):
	return -g[uft_root(g, a)]

def uft_merge(g, a, b):
	a, b = uft_root(g, a), uft_root(g, b)
	if a == b:
		return
	size_a, size_b = uft_size(g, a), uft_size(g, b)
	if size_a < size_b:
		a, b = b, a
		size_a, size_b = size_b, size_a
	g[a] -= size_b
	g[b] = a

uft_pq = [-1] * N
uft_rs = [-1] * N

for p, q in PQ:
	p, q = p - 1, q - 1
	uft_merge(uft_pq, p, q)
for r, s in RS:
	r, s = r - 1, s - 1
	uft_merge(uft_rs, r, s)

group = dd(int)
for n in range(N):
	group[(uft_root(uft_pq, n), uft_root(uft_rs, n))] += 1

result = []
for n in range(N):
	result += [group[(uft_root(uft_pq, n), uft_root(uft_rs, n))]]
print(" ".join(map(str, result)))
A,B=map(int,input().split())
count=0
if i>=A and i<=B:
    array_i=list(map(int,str(i)))
    if set(array_i)==set(reverse(array_i)):
        count+=1
print(count)

### FIXED CODE ###

A,B=map(int,input().split())
count=0
for i in range(A,B+1):
        if str(i)==str(i)[::-1]:
            count+=1
print(count)
N,M=map(int,input().split())

d={}

condi = []

string = ['0']*N

flg=0
for _ in range(M):
    s,c = map(int,input().split())

    condi.append([s,c])

    if s not in d:
        d[s]=c
    elif s in d :
        if d[s]!=c:
            flg+=1

if flg!=0:
    print(-1)
    exit(0)

if d[1]==0:
    print(-1)
    exit(0)



for i in range(N):
    if i==0 and 1 not in d :
        string[0] = '1'
    else:
        if i+1 in d:
            string[i] = str(d[i+1])

str_num = ''.join(string)
print(str_num)



### FIXED CODE ###

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

d={}

condi = []

string = ['0']*N

flg=0
for _ in range(M):
    s,c = map(int,input().split())

    condi.append([s,c])

    if s not in d:
        d[s]=c
    elif s in d :
        if d[s]!=c:
            flg+=1

if flg!=0:
    print(-1)
    exit(0)

if 1 in d:
    if d[1]==0 and N!=1:
        print(-1)
        exit(0)

if N==1 and M==0:
    print(0)
    exit(0)

for i in range(N):
    if i==0 and 1 not in d :
        string[0] = '1'
    else:
        if i+1 in d:
            string[i] = str(d[i+1])

str_num = ''.join(string)
print(str_num)
import sys
input = sys.stdin.readline
inpl = lambda: list(map(int,input().split()))
MOD = 10**9 + 7

N, K = inpl()
edges = [set() for _ in range(N)]
for _ in range(N-1):
    a, b = inpl()
    a -= 1
    b -= 1
    edges[a].add(b)
    edges[b].add(a)

def dfs(node, colors, root=True):
    prod = colors
    if root:
        next_colors = K - 1
    else:
        next_colors = K - 2
    for p in edges[node]:
        edges[p].remove(node)
        prod = prod*dfs(p,next_colors,False) % MOD
        next_colors -= 1
    return prod

print(dfs(0,K))

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
inpl = lambda: list(map(int,input().split()))
MOD = 10**9 + 7

N, K = inpl()
edges = [set() for _ in range(N)]
for _ in range(N-1):
    a, b = inpl()
    a -= 1
    b -= 1
    edges[a].add(b)
    edges[b].add(a)

def dfs(node, colors, root=True):
    if colors == 0:
        return 0
    prod = colors
    if root:
        next_colors = K - 1
    else:
        next_colors = K - 2
    for p in edges[node]:
        if next_colors <= 0:
            return 0
        edges[p].remove(node)
        prod = prod*dfs(p,next_colors,False) % MOD
        if prod == 0:
            return 0
        next_colors -= 1
    return prod

print(dfs(0,K))
n = input()
n = 1000 - n
while n < 0:
    n += 1000
print(n)

### FIXED CODE ###

n = int(input())
n = 1000 - n
while n < 0:
    n += 1000
print(n)
n = int(input())
a = list(map(int,input().split())) #上司の社員番号

for i in range(1,n+1):
    print(a.count(i))


### FIXED CODE ###

import math
r = int(input())
print(r*2*math.pi)
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ans)


### FIXED CODE ###

from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)
import numpy as np
N = int(input())

ARR = []

for i in range(N):
    ARR.append([int(s) for s in input().split(" ")])

PRR = []

for i in range(N):
    PRR.append([int(s) for s in input().split(" ")])

def calculate(n, arr, prr):
    arr = np.array(arr)

    brr = []
    for i in range(1,2 ** 10):

        mask = np.zeros(10)
        for j in range(0, 10):
            m = i >> j & 1
            mask[9-j] = m


    return brr

result = calculate(N, ARR, PRR)
print(max(result))



### FIXED CODE ###

n = int(input())

frr = []

for i in range(n):
    frr.append([int(s) for s in input().split(" ")])

prr = []

for i in range(n):
    prr.append([int(s) for s in input().split(" ")])

# n = 2
#
# frr = [
#     [1, 1, 1, 1, 1, 0, 0, 0, 0, 0],
#     [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
# ]
#
# prr = [
#     [0, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1],
#     [0, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1]
# ]


res = []
for i in range(1,2 ** 10):
    count = [0 for s in range(n)]

    mask = []
    for j in range(10):
        m =  i >> j & 1
        mask.append(m)
        if m == 1:
            for k in range(n):
                if frr[k][j] == 1:
                    count[k] = count[k] + 1

    mm = []
    for index,c in enumerate(count):
        mm.append(prr[index][c])

    res.append(sum(mm))

print(max(res))
S=input();
s=[];
x=[];
X=[];
so=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,83,89,97,101,107,109,113,127,131,137,139,149,151,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,809,811,821,823,827,829,839,853,857,859,863,877,881,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];
ans=1;
for h in range(S):
    Y=h+1;
    for i in so:
        j=0;
        while Y%i==0:
            Y=Y/i;
            s=s+[i];
            j+=1;
for i in so:
    x=x+[s.count(i)];
X=[X+1 for X in x];
for i in X:
    ans=ans*i;
print(ans%1000000007);

### FIXED CODE ###

S=int(input());
s=[];
x=[];
X=[];
so=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];
ans=1;
for h in range(S):
    Y=h+1;
    for i in so:
        j=0;
        while Y%i==0:
            Y=Y/i;
            s=s+[i];
            j+=1;
for i in so:
    x=x+[s.count(i)];
X=[X+1 for X in x];
for i in X:
    ans=ans*i;
print(ans%1000000007);