Harryxun/stf_run huggingface dataset:
m,d = int(input().split())
f = []
d1,d10,cout = 0,0,0
for i in range(m):
  for j in range(d):
    if d+1 >= 10:
      f = list(str(d+1))
      d10 = int(f[0])
      d1 = int(f[1])
    if d1*d10 == i+1:
      cout += 1
print(cout)
      


### FIXED CODE ###

m,d = map(int,input().split())
f = []
d1,d10,cout = 0,0,0
for i in range(m):
  for j in range(d):
    if j+1 >= 10:
      f = list(str(j+1))
      d10 = int(f[0])
      d1 = int(f[1])
    if d1 >=2 and d10 >= 2:
      if d1*d10 == i+1:
        cout += 1
  d10,d1 = 0,0
print(cout)
x,n=map(int,input().split())
r=[i-x for i in map(int,input())]
for i in range(100):
  if not -(i+1) in r:
    print(x-i)
  elif not (i+1) in r:
    print(x+i)


### FIXED CODE ###

x,n=map(int,input().split())
r=[i-x for i in map(int,input().split())]
for i in range(n+1):
  if not -(i) in r:
    print(x-i)
    break
  elif not i in r:
    print(x+i)
    break
def cmb(n, r, mod):
    c=1
    for i in range(1, r+1):
        c = (c * (n-i+1) * pow(i, mod-2, mod)) % mod
    return c

n, a, b = map(int, inputs[0]().split())
MOD = 10**9 + 7
print((pow(2, n, MOD) - cmb(n, a, MOD) - cmb(n, b, MOD) - 1) % MOD)

### FIXED CODE ###

def cmb(n, r, mod):
    c=1
    for i in range(1, r+1):
        c = (c * (n-i+1) * pow(i, mod-2, mod)) % mod
    return c

n, a, b = map(int, input().split())
MOD = 10**9 + 7
print((pow(2, n, MOD) - cmb(n, a, MOD) - cmb(n, b, MOD) - 1) % MOD)
def iroha():
    n, k, price, special = map(int, input().split())
    result = 0
    for i in range(n):
        if i < k:
            result += price
        else:
            result += special
    
    print(result)
            

if __name__ == "__main__":
    iroha()



### FIXED CODE ###

def iroha():
    n, k, price, special = [int(input()) for i in range(4)]
    result = 0
    for i in range(n):
        if i < k:
            result += price
        else:
            result += special
    print(result)

if __name__ == "__main__":
    iroha()
h1, m1,h2, m2, k = map(input().split())


m3=k%60
h3=(k-m2)/60
ans=(h2-h3-h1)*60 + (m2-m3-m1)

print(ans)

### FIXED CODE ###



h1, m1, h2, m2, k = map(int, input().split())
 
 
 
ans=(h2-h1)*60 + (m2-k-m1)
 
print(ans)
a, p=map(int, input().split())
b=(a/3)+p
if b%2==0:
    print(b/2¥n)
else:
    print((b-1)/2¥n)

### FIXED CODE ###

a, p=map(int, input().split())
print((a*3+p)//2)
S = map(int, input().split())
if S = ABC
	print("ABC")
else:
  	print("ARC")


### FIXED CODE ###

S = input()
if S == "ABC":
	print("ARC")
else:
  	print("ABC")
import sys

input = sys.stdin.readline

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

dp = [sys.maxsize] * N

dp[0] = 0

for i in range(1, N):
    s = max(0, i - K)
    dp[i] = min(dp[s:i] + abs(h[s:i] - h[i]))

print(dp[N - 1])


### FIXED CODE ###

import sys
import numpy as np

input = sys.stdin.readline

N, K = map(int, input().split())
h = np.array(list(map(int, (input().split()))))

dp = np.full(N,sys.maxsize,dtype=int)

dp[0] = 0

for i in range(1, N):
    s = max(0, i - K)
    dp[i] = min(dp[s:i] + abs(h[i] - h[s:i]))

print(dp[N - 1])
flag = False
def check(sen,l,s):
    if len(sen)<l:
        check(sen+"dream",l,s)
        check(sen+"dreamer",l,s)
        check(sen+"erase",l,s)
        check(sen+"eraser",l,s)
    else:
        if sen==s:
            global flag
            flag = True

s = input()

check("",len(s),s)

if flag:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

import re
s = input()
m = re.fullmatch(r"(dreamer|dream|erase|eraser)+", s)

if m:
    print("YES")
else:
    print("NO")
s = str(input())

if s[0] == s[1] and s[2] = s[3] and s[0] != s[2]:
    print('Yes')

elif s[0] == s[2] and s[1] == s[3] and s[0] != s[1]:
    print('Yes')

elif s[0] == s[3] and s[1] == s[2] and s[0] != s[1]:
    print('Yes')

else:
    print('No')

### FIXED CODE ###

s = str(input())

if s[0] == s[1] and s[2] == s[3] and s[0] != s[2]:
    print('Yes')

elif s[0] == s[2] and s[1] == s[3] and s[0] != s[1]:
    print('Yes')

elif s[0] == s[3] and s[1] == s[2] and s[0] != s[1]:
    print('Yes')

else:
    print('No')
<?php
$n = intval(trim(fgets(STDIN)));
$ans = floor($n/3);
print "$ans\n";
?>

### FIXED CODE ###

# -*- coding:utf-8 -*-
import math
if __name__ == "__main__":
    n = int(input())
    print(math.floor(n/3))
x = int(input())
y = int(input())
print(int(x+y/2))

### FIXED CODE ###

X,Y = map(int,input().split())
print(X+Y//2)
n, m = map(int, input().split())
a = list(map(int, input().split()))
cnt = 0
 
for i in a:
  if i >= (1/(4*m)):
    cnt += 1

if cnt < M:
  print("No")
else:
  print("Yes")

### FIXED CODE ###

n, m = map(int, input().split())
a = list(map(int, input().split()))
cnt = 0
 
for i in a:
  if i >= sum(a)*(1/(4*m)):
    cnt += 1

if cnt >= m:
  print("Yes")
else:
  print("No")
import math
def count(n, m, l):
    c_m = n // m
    c_l = n // l
    c_ml = n // (m * l // math.gcd(m, l))
     return n - (c_m + c_l - c_ml)

a, b, c, d = map(int, input().split())
b_tar = count(b, c, d)
a_tar = count(a, c, d)
is_plus_a = not(a % c == 0 or a % d == 0)
ans = b_tar - a_tar
if is_plus_a: ans += 1
print(ans)

### FIXED CODE ###

import fractions

def main():
    a, b, c, d = map(int, input().split())
    l =  (c * d) // fractions.gcd(c, d)
    cntb = b - (b // c + b // d - b // l)
    cnta = (a-1) - ((a-1) // c + (a-1) // d - (a-1) // l)
    ans = cntb - cnta

    print(ans)

if __name__ == '__main__':
    main()
S=input()
if S[1]==S[2]==S[3]:
    print('No')
else:
    print('Yes')

### FIXED CODE ###

S=input()
station=set(S)
if len(station)>1:
    print('Yes')
else:
    print('No')
# https://atcoder.jp/contests/abc113/tasks/abc113_b


def temp(T, x, A):
    return abs(A - (T - 0.006 * x))

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

min_diff = temp(T, H[0], A)
answer = 0
for i in range(1, N):
    diff = temp(T, H[i], A)
    if diff < min_diff:
        answer = i
        min_diff = diff
print(answer)


### FIXED CODE ###

# https://atcoder.jp/contests/abc113/tasks/abc113_b


def temp(T, x, A):
    return abs(A - (T - 0.006 * x))

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

min_diff = temp(T, H[0], A)
answer = 0
for i in range(1, N):
    diff = temp(T, H[i], A)
    if diff < min_diff:
        answer = i
        min_diff = diff
print(answer + 1)
import sys
n = int(input())
a = list(map(int, input().split(' ')))

a.sort()
if n%2 == 0:
    for i in range(n-1):
        if i%2 == 0:
            if a[i] == a[i+1]:
                continue
            else:
                print(0)
                sys.exit()
        else:
            if a[i]+2 == a[i+1]:
                continue
            else:
                print(0)
                sys.exit()
    print(int(2**(n/2)%(10**9+7)))
else:
    if a[0] == 0:
        for i in range(1, n-1):
            if i%2 == 1:
                if a[i] == a[i+1]:
                    continue
                else:
                    print(0)
                    sys.exit()
            else:
                if a[i]+2 == a[i+1]:
                    continue
                else:
                    print(0)
                    sys.exit()
        print(int(2**((n-1)/2)%(10**9+7)))    
    else:
        print(0)
        sys.exit()

### FIXED CODE ###

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

a.sort()
if n%2 == 0:
    for i in range(n-1):
        if i%2 == 0:
            if a[i] == a[i+1]:
                continue
            else:
                print(0)
                sys.exit()
        else:
            if a[i]+2 == a[i+1]:
                continue
            else:
                print(0)
                sys.exit()
    result = 2 ** (n//2)
    print(result % (10**9+7))
else:
    if a[0] == 0:
        for i in range(1, n-1):
            if i%2 == 1:
                if a[i] == a[i+1]:
                    continue
                else:
                    print(0)
                    sys.exit()
            else:
                if a[i]+2 == a[i+1]:
                    continue
                else:
                    print(0)
                    sys.exit()
        result = 2**((n-1)//2)
        print(result %(10**9+7))
    else:
        print(0)
        sys.exit()
N, K = map(int,input().split())

from math import factorial

def combinations_count(n, r):
    return factorial(n) // (factorial(n - r) * factorial(r))

div = K - 1  
for i in range(1, K+1):
  split_ball = combinations_count(div, i-1)
  red_ball = N-K-i+1
  red_balls = combinations_count(red_ball+i, i)
  print((split_ball * red_balls) % (10**9 + 7))

### FIXED CODE ###

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

from operator import mul
from functools import reduce

def combinations_count(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

div = K - 1  
for i in range(1, K+1):
  split_ball = combinations_count(div, i-1)
  red_ball = N-K-i+1
  if red_ball<0:
    red_balls = 0
  else:
    red_balls = combinations_count(red_ball+i, i)
  print((split_ball * red_balls) % (10**9 + 7))
import numpy as np
mod = 10**9 + 7

s = input()[::-1]
n = len(s)
DP = np.zeros((n+1, 3))
#[[0]*3 for i in range(n+1)]

htn_cnt = 0
for i, c in enumerate(list(s)):
    DP[i+1]
    if c == "C" or c == "?":
        DP[i+1][0] += DP[i][0] + 3**htn_cnt
        DP[i+1][1] += DP[i][1]
        DP[i+1][2] += DP[i][2]
    if c == "B" or c == "?":
        DP[i+1][0] += DP[i][0]
        DP[i+1][1] += DP[i][1] + DP[i][0]
        DP[i+1][2] += DP[i][2]
    if c == "A" or c == "?":
        DP[i+1][0] += DP[i][0]
        DP[i+1][1] += DP[i][1]
        DP[i+1][2] += DP[i][2] + DP[i][1]
    if c == "?":
        htn_cnt += 1
    for j in range(3):
        DP[i+1][j] = DP[i+1][j] % mod
print(int(DP[n][2] % mod))

### FIXED CODE ###

import numpy as np
mod = 10**9 + 7

s = input()[::-1]
#s = "?"*(10**5)
n = len(s)
DP = [[0]*3 for i in range(n+1)]

power_three = 1

for i, c in enumerate(list(s)):
    for j in range(3):
        if c == "?":
            DP[i+1][j] = 3*DP[i][j] % mod
        else:
            DP[i+1][j] = DP[i][j] % mod
    if c == "C" or c == "?":
        DP[i+1][0] = (DP[i+1][0] + power_three) % mod
    if c == "B" or c == "?":
        DP[i+1][1] = (DP[i+1][1] + DP[i][0]) % mod
    if c == "A" or c == "?":
        DP[i+1][2] = (DP[i+1][2] + DP[i][1]) % mod
    if c == "?":
        power_three = 3*power_three % mod
print(DP[n][2] % mod)
l,R, d = map(int, input()).split()

a =0
for i in range(l,R):
  if i % d == 0:
    a = a+1 

print(a)

### FIXED CODE ###

l,R, d = map(int, input().split())

a =0
for i in range(l,R+1):
  if i % d == 0:
    a = a+1 

print(a)
import math
N = int(input())

def distance(x1,x2,y1,y2):
  return math.sqrt((x1-x2)**2 + (y1-y2)**2)

x1,y1 = [int(s) for s in input().split()]

total_distance = 0
for i in range(1,N):
  x2,y2 = [int(s) for s in input().split()]
  total_distance += distance(x1,x2,y1,y2)
  
print total_distance / N

### FIXED CODE ###

import math
import numpy as np
import itertools

def LI():
  return [int(s) for s in input().split()]

def distance(x1,x2):
  return math.sqrt((x1[0] - x2[0])**2 + (x1[1] - x2[1])**2)

def roots_distance(roots):
  dist = 0
  for i in range((len(roots)-1)):
    dist+=distance(locates[roots[i]],locates[roots[i+1]])
    
  return dist

N = int(input())

locates = np.array([LI() for i in range(N)])

dist = 0
count = 0
for roots in itertools.permutations(range(N),N):
  dist+=roots_distance(roots)
  count+=1
  
print(dist / count)
import re
result=re.fullmatch(r'(\d{3})(\d)/(\d{2})/(\d{2})',input())
print(result.group(1)+'8/'+result.group(3)+'/'+result.group(4)

### FIXED CODE ###

import re
s=input()
result=re.fullmatch(r'(\d{3})(\d)/(\d{2})/(\d{2})',s)
print(result.group(1)+'8/'+result.group(3)+'/'+result.group(4))
s = input()
print("Yes" if "9" in s else "No)

### FIXED CODE ###

value = int(input())
if value // 10 == 9 or value % 10 == 9:
	print("Yes")
else:
	print("No")
a, b = input().split
if a.isdigit():
  a = int(a)
else:
  a = ord(a) - 50

if b.isdigit():
  b = int(b)
else:
  b = ord(b) - 50

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


### FIXED CODE ###

s = input()

a, b = s.split()
if a.isdigit():
  a = int(a)
else:
  a = ord(a) - 50

if b.isdigit():
  b = int(b)
else:
  b = ord(b) - 50

if a < b:
  print("<")
elif a > b:
  print(">")
else:
  print("=")
n = int(input())
if n%2:
    print(0)
else:
    ans = (n//5)//2
    tmp = 5
    while True:
        tmp *= 5
        if tmp > n:
            break
        ans += (n//tmp)//2
print(ans)

### FIXED CODE ###

n = int(input())
if n%2:
    print(0)
else:
    #2と5があれば10ができる→5の方が少ない→素因数5の数を数える
    ans = (n//5)//2
    tmp = 5
    while True:
        tmp *= 5
        if tmp > n:
            break
        ans += (n//tmp)//2
    print(ans)
from itertools import *

N, M = map(int, input().split())
G = [set() for _ in range(M)]

for _ in range(M):
    a, b = map(int, input().split())
    G[a-1].add(b-1)
    G[b-1].add(a-1)

ans = 0

for p in permutations(range(N)):
    if p[0]!=1:
        continue
    
    flag = True
    
    for i in range(N-1):
        if p[i+1] not in G[p[i]]:
            flag = False
    
    if flag:
        ans += 1

print(ans)

### FIXED CODE ###

from itertools import *

N, M = map(int, input().split())
G = [set() for _ in range(N)]

for _ in range(M):
    a, b = map(int, input().split())
    G[a-1].add(b-1)
    G[b-1].add(a-1)

ans = 0

for p in permutations(range(N)):
    if p[0]!=0:
        continue
    
    flag = True
    
    for i in range(N-1):
        if p[i+1] not in G[p[i]]:
            flag = False
    
    if flag:
        ans += 1

print(ans)
N = int(input())
lst = list(map(int, input().split()))
output = 1
if 0 in lst:
    print(0)
    quit()
for i in ls:
    output *= i
    if output > 10**18:
        print(-1)
        quit()
print(output)

### FIXED CODE ###

n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    print(0)
    quit()
for x in ls:
    res *= x
    if res > 10**18:
        print(-1)
        quit()
print(res)
import math
a,b,n = map(int,input().split())
x = 0
ans = 0
if b > n:
    x = n
    ans = math.floor(a*n/b) - a*math.floor(n/b)
else:
    n = b-1
    ans = ath.floor(a*n/b) - a*math.floor(n/b)
print(ans)


### FIXED CODE ###

import math
a,b,n = map(int,input().split())
x = 0
ans = 0
if b > n:
    x = n
    ans = math.floor(a*n/b) - a*math.floor(n/b)
else:
    n = b-1
    ans = math.floor(a*n/b) - a*math.floor(n/b)
print(ans)
while 1:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  for i in range(H):
    print "#" 
    print "." * W-2
    print "#"
  print""

### FIXED CODE ###

while 1:
  H, W = map(int, raw_input().split())
  if (H == 0 and W == 0):
    break
 
  print ('#' * W)
  for i in range(1,H-1):
    print ('#' + '.' * (W - 2) + '#' )
  print ('#'* W)
  print""
s = input().strip()
N = len(s)
x,y = map(int,input().split())
for i in range(N):
    if s[i]=="T":
        ind = i
        break
C={"x":[],"y":[]}
flag=0
cnt = 0
for i in range(ind+1,N):
    if s[i]!="T":
        cnt += 1
    else:
        if flag==0 and cnt>0:
            C["y"].append(cnt)
        elif flag==1 and cnt>0:
            C["x"].append(cnt)
        cnt = 0
        flag = 1-flag
if flag==0:
    C["y"].append(cnt)
else:
    C["x"].append(cnt)
nx = len(C["x"])
x = x-ind  #x>=-N
dp1 = {(i,j):0 for i in range(nx+1) for j in range(-N,N+1)}
dp1[(0,0)]=1
for i in range(1,nx+1):
    for j in range(-N,N+1):
        dp1[(i,j)] = dp1[(i-1,j)]
        if j-C["x"][i-1]>=-N:
            dp1[(i,j)] = dp1[(i,j)]|dp1[(i-1,j-C["x"][i-1])]
        if j+C["x"][i-1]<=N:
            dp1[(i,j)] = dp1[(i,j)]|dp1[(i-1,j+C["x"][i-1])]
ny = len(C["y"])
dp0 = {(i,j):0 for i in range(ny+1) for j in range(-N,N+1)}
dp0[(0,0)] = 1
for i in range(1,ny+1):
    for j in range(-N,N+1):
        dp0[(i,j)] = dp0[(i-1,j)]
        if j-C["y"][i-1]>=-N:
            dp0[(i,j)] = dp0[(i,j)]|dp0[(i-1,j-C["y"][i-1])]
        if j+C["y"][i-1]<=N:
            dp0[(i,j)] = dp0[(i,j)]|dp0[(i-1,j+C["y"][i-1])]
if dp1[(nx,x)]==1 and dp0[(ny,y)]==1:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

s = input().strip()
x,y = map(int,input().split())
C = {}
cur = 0
cnt = 0
for i in range(len(s)):
    if s[i]=="F":
        cnt += 1
    else:
        C[cur] = cnt
        cur += 1
        cnt = 0
C[cur] = cnt
AX = []
AY = []
for a in C:
    if a>0 and a%2==0 and C[a]>0:
        AX.append(C[a])
    elif a%2==1 and C[a]>0:
        AY.append(C[a])
cntx = sum(AX)
dpx = [[0 for _ in range(2*cntx+1)] for _ in range(len(AX)+1)]
dpx[0][cntx] = 1
if cntx>0:
    dpx[1][cntx-AX[0]] = 1
    dpx[1][cntx+AX[0]] = 1
    for i in range(2,len(AX)+1):
        for j in range(-cntx,cntx+1):
            if -cntx<=j-AX[i-1]:
                dpx[i][j+cntx] = dpx[i-1][j-AX[i-1]+cntx]
                if j+AX[i-1]<=cntx:
                    dpx[i][j+cntx] = max(dpx[i][j+cntx],dpx[i-1][j+AX[i-1]+cntx])
            elif j+AX[i-1]<=cntx:
                dpx[i][j+cntx] = dpx[i-1][j+AX[i-1]+cntx]
cnty = sum(AY)
dpy = [[0 for _ in range(2*cnty+1)] for _ in range(len(AY)+1)]
dpy[0][cnty] = 1
if cnty>0:
    dpy[1][cnty-AY[0]] = 1
    dpy[1][cnty+AY[0]] = 1
    for i in range(2,len(AY)+1):
        for j in range(-cnty,cnty+1):
            if -cnty<=j-AY[i-1]:
                dpy[i][j+cnty] = dpy[i-1][j-AY[i-1]+cnty]
                if j+AY[i-1]<=cnty:
                    dpy[i][j+cnty] = max(dpy[i][j+cnty],dpy[i-1][j+AY[i-1]+cnty])
            elif j+AY[i-1]<=cnty:
                dpy[i][j+cnty] = dpy[i-1][j+AY[i-1]+cnty]
if C[0]-cntx<=x<=C[0]+cntx and dpx[len(AX)][x-C[0]+cntx]==1 and -cnty<=y<=cnty and dpy[len(AY)][y+cnty]==1:
    print("Yes")
else:
    print("No")
n = int(input())
p = list(map(int,input().split()))
ans = 0
min_p = p[0]
for i in p:
  if i <= min_p:
    ans += 1
     min_p = i
print(ans)


### FIXED CODE ###

n = int(input())
p = list(map(int,input().split()))
ans = 0
min_p = p[0]
for i in p:
  if i <= min_p:
    ans += 1
    min_p = i
print(ans)
n = int(input())
s = input()

ans = 0
while s.find('#.') != -1:
    if s.find('##.#'):
        s = s[:pos] + '####' + s[pos+4:]
        ans += 1
    elif s.find('##..'):
        # ?
        s = s[:pos] + '####' + s[pos+4:]
        ans += 2
    elif s.find('.#.#'):
        s = s[:pos] + '...#' + s[pos+4:]
        ans += 1
    elif s.find('.#..'):
        s = s[:pos] + '....' + s[pos+4:]
        ans += 1
print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline

n = int(input())
s = list(input())
res = 10**9

cta = 0
ctb = 0
a = [0]*n
b = [0]*n
for i in range(n):
    if s[i] == '.':
        cta += 1
    else:
        ctb += 1
    a[i] = cta
    b[i] = ctb
for i in range(n):
    res = min(res,b[i]+a[-1]-a[i])
res = min(res,a[-1],b[-1])
print(res)
def main():
    a, b, c = map(int, input.split())
    list = [a, b, c]
    count = 1
    for i in list:
        if i == 1:
            count += 1
    print(count)
main()

### FIXED CODE ###

s = input()
print(s.count("1"))
H,W = map(int,input().split())
s = [list(map(int,input().split())) for _ in range(H)]

for h in range(H):
    for w in range(W):
        if s[h][w] == "#":
            if h>0 ans s[h-1][w]=="#":
                continue
            elif h<H-1 ans s[h+1][w]=="#":
                continue
            elif w>0 ans s[h][w-1]=="#":
                continue
            elif h<W-1 ans s[h][w+1]=="#":
                continue
            else:
                print("No")
                break
else:
    print("Yes")

### FIXED CODE ###

H,W = map(int,input().split())
s = [list(input()) for _ in range(H)]

bre = False
for h in range(H):
    for w in range(W):
        if s[h][w] == "#":
            if h>0 and s[h-1][w]=="#":
                continue
            elif h<H-1 and s[h+1][w]=="#":
                continue
            elif w>0 and s[h][w-1]=="#":
                continue
            elif w<W-1 and s[h][w+1]=="#":
                continue
            else:
                #print(h,w)
                print("No")
                bre = True
                break
    if bre:
        break
else:
    print("Yes")
_ = int(input())
A = list(map(int, input().split()))

A.sort()
basis = []

for a in A:
    for b in basis:
        if a % b == 0:
            break
    else:
        basis.append(a)

ans = 0
c = Counter(A)
for b in basis:
    if c[b] == 1:
        ans += 1

print(ans)

### FIXED CODE ###

from collections import Counter

_ = int(input())
A = list(map(int, input().split()))
a_max = 10 ** 6

c = Counter(A)
b = list(set(A))
b.sort()

dp = [True] * (a_max + 1)
ans = 0
for a in b:
    if dp[a]:
        if c[a] == 1:
            ans += 1
        for i in range(2 * a, a_max + 1, a):
            dp[i] = False

print(ans)
import sys
N=int(input())
a=[int(i) for i in input().split()]
t=0
while True:
  for i in range(N):
    if a[i]%2==0:
      a[i]//=2
    else:
      print(t)
      sys.exit()
	t+=1
      

### FIXED CODE ###

a=input()
print(a.count('1'))
N, D = map(int, input().split())
print(N//(D*2+1)+1)N, D = map(int, input().split())
print(-(-N//(D*2+1)))

### FIXED CODE ###

N, D = map(int, input().split())
if N%(D*2+1)==0:
    print(N//(D*2+1))
else:
    print(N//(D*2+1)+1)
a =str(input()).split(" ")
h = int(a[0])
w = int(a[1])
maps= []

for i in range(h):
    maps.append(list(input()))
   
for i in range(h-1):
    for j in range(w):
        if maps[i][j] == "#":
            if maps[i][j - 1] == "#" and j - 1 > 0:
                continue
            elif maps[i][j + 1] == "#" and j + 1 < w:
                continue
            elif maps[i + 1][j] == "#" and i + 1 < h:
                continue
            elif maps[i - 1][j] == "#" and i - 1 > 0:
                continue
            else:
                print("No")
                exit()
        else:
            pass

print("Yes")


### FIXED CODE ###

a =str(input()).split(" ")
h = int(a[0])
w = int(a[1])
maps= []

for i in range(h):
    maps.append(list(input()))

for i in range(h):
    for j in range(w):
        if maps[i][j] == "#":
            if j - 1 >= 0 and maps[i][j - 1] == "#":
                continue
            elif j + 1 < w and maps[i][j + 1] == "#" :
                continue
            elif i + 1 < h and maps[i + 1][j] == "#" :
                continue
            elif i - 1 >= 0 and maps[i - 1][j] == "#":
                continue
            else:
                print("No")
                exit()
        else:
            pass
print("Yes")