Harryxun/stf_run huggingface dataset:
H, W = map(int, input())
S = [list(input()) for __ in range(H)]

dl = [(-1, 0), (0, 1), (1, 0), (-1, -1)]
for i, row in enumerate(S):
    for j, val in enumerate(row):
        if val == '.':
            continue

        res = False
        for dx, dy in dl:
            di, dj = i + dx, j + dy
            if di < 0 or W < di or dj < 0 or H < dj:
                continue
            if S[di][dj] == '#':
                res = True
                break
        if res:
            print('No')
print('Yes')

### FIXED CODE ###

def resolve():
    H, W = map(int, input().split())
    S = [list(input()) for __ in range(H)]

    dl = [(-1, 0), (0, 1), (1, 0), (0, -1)]
    for i, row in enumerate(S):
        for j, val in enumerate(row):
            if val == '.':
                continue

            can_paint = False
            for dx, dy in dl:
                di, dj = i + dx, j + dy
                if di < 0 or H <= di or dj < 0 or W <= dj:
                    continue
                if S[di][dj] == '#':
                    can_paint = True
                    break
            if not can_paint:
                return 'No'
    return 'Yes'

print(resolve())
import sys
dic=[{} for i in range(26)]
alpha = "abcdefghijklmnopqrstuvwxyz"

def makedic():
    for i in range(26):
        tmp = alpha[i:]+alpha[:i]
        for j in range(26):
            dic[i][alpha[j]]=tmp[j]
    return

def crack(word):
    for i in range(26):
        s=[]
        for c in word:
            s.append(dic[i][c])
        s="".join(s)
        if s=="the" or s=="this" or s=="that":
            return i
    return None

makedic()
while True:
    try:
        s = raw_input().strip('\n')
    except:
        break

    for e in s.split():
        lene=len(e)
        if lene==3 or lene==4:
            offset = crack(e)
            break
    x = []
    for c in s:
        if "a"<=c and c<="z": x.append(dic[offset][c])
        else: x.append(c)
    print "".join(x)

### FIXED CODE ###

import sys,string
A="abcdefghijklmnopqrstuvwxyza"
tbl=string.maketrans(A[:-1],A[1:])
for s in sys.stdin:
    while not("the" in s or "that" in s or "this" in s):
        s=s.translate(tbl)
    print s[:-1]
import math
import fractions
def isprime(number):
    for i in range(2, round(math.sqrt(number)) + 1):
        if number % i == 0:
            return False
    return True

A, B = map(int, input().split())
count = 1
N = fractions.gcd(A, B)

for i in range(2, N + 1):
  	if i != 2 and i % 2 == 0:
      continue
    if N % i == 0:
        if isprime(i):
            count += 1

print(str(count))


### FIXED CODE ###

from fractions import gcd
def f(n):
    tmp = n
    cnt = 0
    i = 2
    while i <= n**0.5 + 1:
        if tmp < i:
            break
        if tmp % i == 0:
            cnt += 1
            while tmp % i == 0:
                tmp //= i
        i += 1
    if tmp != 1:
        cnt += 1
    return cnt

A, B = map(int, input().split())
g = gcd(A, B)
ans = f(g) + 1
print(ans)
n, a, b = map(int, input().split())
t = 'b' * a + 'r' * b
count = int(n/len(t)) + 1
t=(t*count)[0:n]
print(t.count('b'))

### FIXED CODE ###

n, a, b = map(int, input().split())
t = a + b
count = t if t > 0 else 0
r = 0
if count == 0:
	r = 0
else:
	d = int(n/t)
	if d*t == n:
		r = d * a
	else:
		r = d * a
		e = n - d*t
		if e <= a:
			r = r + e
		else:
			r = r + a
print(r)
# -*- coding: utf-8 -*-
import math
import sys
a,b=map(int, input().split())

x = math.floor(a/0.08)
#1の位が1-9
y = math.floor(b/0.1)
if (x + 1) * 0.08 == a:
    xx = x + 2
else:
    xx = x + 1

for i in range(y,y+10):
    for j in range(x, xx):
        if i == j:
            print(i)
            sys.exit(0)
print(-1)
      

### FIXED CODE ###

# -*- coding: utf-8 -*-
n, a,b=map(int, input().split()) 
X = n//(a+b)
Y = n%(a+b)
if Y > a:
    print(X*a + a)
else:
    print(X*a + Y)
def f_d():
    import heapq
    x, y, z, k = map(int, input().split())
    *a, = sorted(list(map(int, input().split())), reverse=True)
    *b, = sorted(list(map(int, input().split())), reverse=True)
    *c, = sorted(list(map(int, input().split())), reverse=True)

    m, o = [[[0]*z for _ in range(y)] for _ in range(x)], []
    q = [[-1*(a[0]+b[0]+c[0]), 0, 0, 0]]
    heapq.heapify(q)
    for _ in range(k):
        tmp = heapq.heappop(q)
        o.append(-1*tmp[0])
        ai, bi, ci = tmp[1], tmp[2], tmp[3]
        if m[min(ai+1, len(a)-1)][bi][ci]==0:
            m[ai+1][bi][ci] = 1
            heapq.heappush(q, [-1*(a[ai+1]+b[bi]+c[ci]), ai+1, bi, ci])
        if m[ai][min(bi+1, len(b)-1)][ci]==0:
            m[ai][bi+1][ci] = 1
            heapq.heappush(q, [-1*(a[ai]+b[bi+1]+c[ci]), ai, bi+1, ci])
        if m[ai][bi][min(ci+1, len(c)-1)]==0:
            m[ai][bi][ci+1] = 1
            heapq.heappush(q, [-1*(a[ai]+b[bi]+c[ci+1]), ai, bi, ci+1])
    for i in range(k):
        print(o[i])

if __name__ == "__main__":
    f_d()


### FIXED CODE ###

def f_d():
    import heapq
    x, y, z, k = map(int, input().split())
    *a, = sorted(list(map(int, input().split())), reverse=True)
    *b, = sorted(list(map(int, input().split())), reverse=True)
    *c, = sorted(list(map(int, input().split())), reverse=True)

    m = set((0, 0, 0))
    q = [[-1*(a[0]+b[0]+c[0]), 0, 0, 0]]
    heapq.heapify(q)
    for _ in range(k):
        ans, ai, bi, ci = heapq.heappop(q)
        if ai+1<x and (ai+1, bi, ci) not in m:
            m.add((ai+1, bi, ci))
            heapq.heappush(q, [-1*(a[ai+1]+b[bi]+c[ci]), ai+1, bi, ci])
        if bi+1<y and (ai, bi+1, ci) not in m:
            m.add((ai, bi+1, ci))
            heapq.heappush(q, [-1*(a[ai]+b[bi+1]+c[ci]), ai, bi+1, ci])
        if ci+1<z and (ai, bi, ci+1) not in m:
            m.add((ai, bi, ci+1))
            heapq.heappush(q, [-1*(a[ai]+b[bi]+c[ci+1]), ai, bi, ci+1])
        print(-1*ans)

if __name__ == "__main__":
    f_d()
a=int(print())
b=int(print())
c=int(print())
d=int(print())
e=int(print())
k=int(print())

if (e-a)<=k:
  print('Yay!')

else:
  print(':(')

### FIXED CODE ###

a=[int(input()) for i in range(5)]
k=int(input())
x=max(a)-min(a)
if x<=k:
  print('Yay!')
else:
  print(':(')
from sortedcontainers import SortedList
import numpy as np

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

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

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

print(a)
for l in s:
    b, c = l
    min_values = np.array(list(a.pop(0) for i in range(b)))
    min_values = np.array(min_values)
    change_cond = min_values < c
    min_values[change_cond] = c
    a.update(min_values)
a = list(a)
ans = sum(a)
print(ans)




### FIXED CODE ###

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

from collections import defaultdict

cb = defaultdict(int)

for a in input().split():
    cb[int(a)] += 1

for _ in range(m):
    b, c = map(int, input().split())
    cb[c] += b

cbl = sorted(cb.items())

res = n

ans = 0

while res > 0:
    c, b = cbl.pop()
    ncount = min(res, b)
    ans += c * ncount
    res -= ncount

print(ans)
r = int(input())
print(3 * (r ** 2)

### FIXED CODE ###

r = int(input())
print(3 * r ** 2)
a=input().split()
N,A,B=int(a[0]),int(a[1]),int(a[2])
st_a='b'*A
st_b='r'*B
d=st_a+st_b
e=A+B
if(N==0):
  print(0)
elif(A==0):
  print(0)
elif(B==0):
  print(N)
elif(e==0):
  print(0)
else:
  num=int(N/e)+2
  b=d*num
  c=b[0:N]
  print(c.count('b'))

### FIXED CODE ###

a=input().split()
N,A,B=int(a[0]),int(a[1]),int(a[2])
b=int(N/(A+B))
ans=int(A*b)
if(N-b*(A+B)<=A):
    ans=ans+N-b*(A+B)
else:
    ans+=A
print(int(ans))
N,K=map(int,input().split())
n=list(map(int, input().split()))
m=n.sort()
print(sum(m[0:K]))


### FIXED CODE ###

N,K=map(int,input().split())
n=list(map(int, input().split()))
m=sorted(n)
print(sum(m[0:K]))
S=input()
T=input()
s=0
flag1=False
for i in range(len(S)-len(T)+1):
    flag2=True
    for j in range(len(T)):
        if S[i+j]!=T[j] and S[i+j]!='?':
            flag2=False
    if flag2==True:
        flag1=True
        s=i
if flag1==False:
    print('UNRESTORABLE')
else:
    for i in range(len(S)):
        if i>=s:
            print(T[i-s],end='')
        elif S[i]=='?':
            print('a',end='')
        else:
            print(S[i],end='')

### FIXED CODE ###

S=input()
T=input()
s=0
flag1=False
for i in range(len(S)-len(T)+1):
    flag2=True
    for j in range(len(T)):
        if S[i+j]!=T[j] and S[i+j]!='?':
            flag2=False
    if flag2==True:
        flag1=True
        s=i
if flag1==False:
    print('UNRESTORABLE')
else:
    for i in range(len(S)):
        if i>=s and i-s<len(T):
            print(T[i-s],end='')
        elif S[i]=='?':
            print('a',end='')
        else:
            print(S[i],end='')
print min([input() for i in [1,1,1])+min([input() for i in [1,1]]) -50

### FIXED CODE ###

a=[input() for i in [1]*5]
print min(a[:3])+min(a[3:])-50
A,B,K = map(int,input().split())
a = []
b = []

for i in range(1,A+1):
  if A%i==0:
    a.append(i)
for j in range(1,B+1):
  if B%j==0:
    b.append(j)

abset = list(set(a)&set(b))

print(abset[K+1])

### FIXED CODE ###

A,B,K = map(int,input().split())
a = []
b = []

for i in range(1,A+1):
  if A%i==0:
    a.append(i)
for j in range(1,B+1):
  if B%j==0:
    b.append(j)

abset = list(sorted(set(a)&set(b)))[::-1]

print(abset[K-1])
import sys
from math import gcd
from functools import reduce

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


def lcm(x, y):
    return x * y // gcd(x, y)


def main():
    N, M, *A = map(int, read().split())
    A = [a // 2 for a in A]

    semi_lcm = reduce(lcm, A)
    for a in A[1:]:
        semi_lcm = lcm(semi_lcm, a)
        if semi_lcm > M or semi_lcm // a % 2 == 0:
            print(0)
            return

    print((M // semi_lcm + 1) // 2)
    return


if __name__ == '__main__':
    main()


### FIXED CODE ###

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

from math import floor
from fractions import gcd
from functools import reduce


def lcm(x, y):
    return x * y // gcd(x, y)


b = [n // 2 for n in a]

lcm_b = reduce(lcm, b)

for n in b:
    if (lcm_b // n) % 2 == 0:
        print(0)
        exit()

n = floor((M / lcm_b - 1) / 2) + 1

print(n)
v

### FIXED CODE ###

# ABC 100: B – Ringo's Favorite Numbers
d, n = map(int, input().split())
print(n * 100 ** d if n != 100 else (n + 1) * 100 ** d)
n = int(input())
nums = list(map(int, input().split()))
sum = 1
flag = 1
upper = pow(10, 18)
for num in nums:
  sum = sum * num
  if sum > upper:
    flag = 0
  elif num == 0
    sum = 0
if flag == 1:
  print(sum)
elif:
  print(-1)

### FIXED CODE ###

n = int(input())
nums = list(map(int, input().split()))
sum = 1
flag = 1
upper = pow(10, 18)
for num in nums:
  if num == 0:
    sum = 0
    flag = 1
    break
  if flag == 1:
    sum = sum * num
    if sum > upper:
      flag = 2

if flag == 1:
  print(sum)
elif flag == 2:
  print(-1)
S = raw_input()

chksum = 0
 
if ('a' in S):
    chksum+=1
if ('b' in S):
    chksum+=1
if ('c' in S):
    chksum+=1
    
if chksum == 3:
	print("yes")
else:
	print("no")

### FIXED CODE ###

S = input()

chksum = 0
 
if ('a' in S):
    chksum+=1
if ('b' in S):
    chksum+=1
if ('c' in S):
    chksum+=1
    
if chksum == 3:
	print("Yes")
else:
	print("No")
input_data = []
data = input()


memory="first"
i=0
k=0

#最後二つが同じなら削除
if data[-1]==data[-2]:
    k+=1
    data=data[:-2]

max_len=len(data)
while max_len!=i:
    if data[i] == memory:
        memory=data[i:i+2]
        i+=2
    else:
        memory=data[i]
        i+=1        
    k+=1
    
print(k)

### FIXED CODE ###

input_data = []
data = input()


memory="first"
i=0
k=0

#最後二つが同じなら削除
if data[-1]==data[-2]:
    k+=1
    data=data[:-2]

max_len=len(data)
while max_len!=i:
    try:
        if data[i] != memory:
            memory=data[i]
            i+=1             
        else:
            memory=data[i:i+2]
            i+=2
    except:
        break
    k+=1
    
print(k)
N, X = map(int, input().split())

def burger(N,X):
  #print(N,X)
  if N == 0 and X == 1:
    return 1
  if X == 0:
    return 0
  twopow = pow(2,N)
  if X > 2*twopow-2:
    return twopow + burger(N-1,X-2*twopow+1)
  elif X <= 2*twopow-3:
    return burger(N-1,X-1)

print(burger(N,X))


### FIXED CODE ###

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

def burger(N,X):
  #print(N,X)
  if N == 0 and X == 1:
    return 1
  if X == 0:
    return 0
  twopow = pow(2,N)
  if X == 4*twopow-3:
    return 2*twopow-1
  if X > 2*twopow-2:
    return twopow + burger(N-1,X-2*twopow+1)
  elif X <= 2*twopow-2:
    return burger(N-1,X-1)

print(burger(N,X))
# -*- coding: utf-8 -*-
n = int(input())
a = int(input())

if n % 500 =< a:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

# -*- coding: utf-8 -*-
n = int(input())
a = int(input())

if n % 500 <= a:
    print("Yes")
else:
    print("No")
k = int(input())
if k%2 == 0:
	print(-1)
elif k%5 == 0:
	print(-1)
else:
	s = 7
	while s%k != 0:
		s = 10*s+7
	print(len(s))

### FIXED CODE ###

import sys

k = int(input())

a = 0

for i in range(1, k+1):
	a = (a*10+7)%k
	if a == 0:
		print(i)
		sys.exit()
print(-1)
from numpy import prod
N = int(input())
S = input()
appearances = {"R": 0, "G": 0, "B": 0}
for c in S:
    appearances[c] += 1
print(prod(list(appearances.values())) - sum(sum(len(set(S[start] + S[start + step] + S[start + step * 2])) == 3 for start in range(N - step * 2)) for step in range(1, N // 2 + 1)))


### FIXED CODE ###

from numpy import prod
N = int(input())
S = input()
appearances = {"R": 0, "G": 0, "B": 0}
for c in S:
    appearances[c] += 1
print(prod(list(appearances.values())) - sum(sum(len(set(S[start] + S[start + step] + S[start + step * 2])) == 3 for start in range(N - step * 2)) for step in range(1, N // 2 + 1)))
inf = 10**5+1
n,m = map(int,input().split())
p = [inf]*n
for _ in range(n):
  a,b = map(int,input().split())
  A = max(a,b)
  B = min(a,b)
  if p[A-1] > B:
    p[A-1] = B
  if p[B-1] > A:
    p[B-1] = A
p[0] = 'Yes'
if max(p[1:]) == 10**5+1:
  print('No')
else:
  for i in range(len(p)):
    print(p[i])



### FIXED CODE ###

from collections import deque

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

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

q = deque([0])
dist = [-1]*N
dist[0] = 0

while q:
  v = q.popleft()
  for nv in G[v]:
    if dist[nv] == -1:
      dist[nv] = v+1
      q.append(nv)

print("Yes")
print(*dist[1:], sep="\n")
# -*- coding: utf-8 -*-
import numpy as np
import math

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

def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
  
print(comb(N, M))

### FIXED CODE ###

# -*- coding: utf-8 -*-
import numpy as np
import math
 
N, M = map(int, input().split())
 
def comb(n, r):
    if n < r:
        return 0
    else:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
  
print(comb(N, 2)+comb(M, 2))
from functools import reduce
import math
n,X=map(int,input().split())
x=list(map(int,input().split()))
y=[]
for i in range(n):
  y.append(x[i]-X)
def gcd(*numbers):
  return reduce(math.gcd,numbers)
print(gcd(y))
  
  


### FIXED CODE ###

import fractions
import sys
n,X=map(int,input().split())
x=list(map(int,input().split()))
y=[]
if n==1:
  print(abs(x[0]-X))
  sys.exit()
for i in range(n):
  y.append(abs(x[i]-X))
G=100000000000
for j in range(n-1):
  G=min(G,fractions.gcd(y[j],y[j+1]))
print(G)
def isPrime(x):
    if x == 2:
        return True

    if x < 2 or x % 2 == 0:
        return False
    i = 3
    xx = int(pow(x, 0.5))
    while i <= xx:
        if x % i == 0:
            return False
        i += 2
    return True

n = int(input())
rx = int(pow(n, 0.5))
l = rx+1
ps = []
for i in range(n):
    if isPrime(i):
        ps.append(i)
    if i == l:
        break
ans = []
i = 0
nn = n
while n != 1:
    if n % ps[i] == 0:
        n //= ps[i]
        ans.append(ps[i])
    else:
        i += 1
print(str(nn)+":", ' '.join(map(str, ans)))

### FIXED CODE ###

n = int(input())
print("{}:".format(n), end='')
x = int(pow(n, 0.5))+1
for i in range(2, x):
    while n % i == 0:
        print(" {}".format(i), end='')
        n //= i
print(' {}'.format(n) if n != 1 else '')
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import itertools
from collections import deque

N = int(readline())
A = list(map(lambda x: int(x) - 1,read().split())) + [-1]

def test(A,B):
    for x,y in zip(B, B[1:]):
        if A[x] == y:
            return False
    return True

def solve_small(cand, A, ng_first = -1):
    for p in itertools.permutations(cand):
        if p[0] == ng_first:
            continue
        if test(A, p):
            return p
    return False

if N <= 4:
    p = solve_small(range(N), A)
    if not p:
        print(-1)
        exit()
    print(' '.join(str(x+1) for x in p))
    exit()

rest = deque(range(N))
B = []
prev = N
for _ in range(N-4):
    x = rest[0]; y = rest[1]
    if A[prev] == x:
        B.append(y)
        rest.popleft()
        rest.popleft()
        rest.appendleft(x)
    else:
        B.append(x)
        rest.popleft()
    prev = B[-1]

B += list(solve_small(rest, A, A[B[-1]]))

print(' '.join(str(x+1) for x in B))

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import itertools
from collections import deque
from heapq import heappop, heappush, heapify
from collections import defaultdict

N = int(readline())
A = list(map(lambda x: int(x) - 1,read().split())) + [-1]

def test(A,B):
    for x,y in zip(B, B[1:]):
        if A[x] == y:
            return False
    return True

def solve_small(cand, A, ng_first = -1):
    for p in itertools.permutations(cand):
        if p[0] == ng_first:
            continue
        if test(A, p):
            return p
    return False

if N <= 6:
    p = solve_small(range(N), A)
    if not p:
        print(-1)
        exit()
    print(' '.join(str(x+1) for x in p))
    exit()

in_deg = [0] * (N+10)
for x in A:
    in_deg[x] += 1

q = [(-x, i) for i,x in enumerate(in_deg)] # in_deg最大の人を分かるようにしたい
heapify(q)
se = set(q)

def greedy(rest,A,ng_first):
    B = []
    ng = ng_first
    while len(rest) >= 4:
        x = rest[0]; y = rest[1]
        if ng == x:
            B.append(y)
            rest.popleft()
            rest.popleft()
            rest.appendleft(x)
        else:
            B.append(x)
            rest.popleft()
        ng = A[B[-1]]
    return B

rest = deque(range(N))
B = []
prev = N
n = N
for _ in range(N-4):
    while q[0] not in se:
        heappop(q)
    if -q[0][0] == n - 1:
        v = q[0][1]
        B.append(v)
        rest.remove(v)
        B += greedy(rest, A, A[B[-1]])
        break
    x = rest[0]; y = rest[1]
    if A[prev] == x:
        B.append(y)
        rest.popleft()
        rest.popleft()
        rest.appendleft(x)
    else:
        B.append(x)
        rest.popleft()
    prev = B[-1]
    v = A[B[-1]]
    se.remove((-in_deg[v],v))
    in_deg[v] -= 1
    se.add((-in_deg[v],v))
    n -= 1
if len(B) < N:
    B += list(solve_small(rest, A, A[B[-1]]))

print(' '.join(str(x+1) for x in B))
a, b, c = map(int, input().split())
if b - a == c - b:
    print('YES')
else: prin('NO')

### FIXED CODE ###

a, b, c = map(int, input().split())
if b - a == c - b:
    print('YES')
else: print('NO')
import copy
n=int(input())
a=[int(input()) for i in range(n)]
for i in range(n):
  temp=copy.deepcopy(a)
  temp.pop(i)
  print(max(temp))

### FIXED CODE ###

a=int(input())
print(3*a**2)
r,g,b=map(int,input().split())
print("YES" if (r*100+g10+b)%4==0 else "NO")

### FIXED CODE ###

r,g,b=map(int,input().split())
print("YES" if (r*100+g*10+b)%4==0 else "NO")
l=list(map(int,input().split()))
if(l[0]==l[1]):
  print(l[2])
elif(l[1]==l[2]):
  print(l[0]):
else:print(l[1])

### FIXED CODE ###

l=list(map(int,input().split()))
if(l[0]==l[1]):
  print(l[2])
elif(l[1]==l[2]):
  print(l[0])
else:print(l[1])
a,b,c=input().split()
if a+b=c or a+c=b or b+c=a:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a,b,c=map(int,input().split())
if a+b==c or a+c==b or b+c==a:
    print("Yes")
else:
    print("No")
a = input()
b = input()
print('YES' if a==b[::-1])

### FIXED CODE ###

a = input()
b = input()
print('YES' if a==b[::-1] else 'NO')
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

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

t = [0]*(10**6)

for p in range(n):
    t[lis[p]] = 1

count =n
for p in range(n):
    for k in make_divisors(lis[p]):
        #print(str(p) +" " + str(k))
        if t[k] == 1:
            if lis[p] != k or lis.count(lis[p]) > 1:
                count -= 1
                break
print(count)

### FIXED CODE ###

n = int(input())
lis = list(map(int, input().split()))
maxL = max(lis)+1
t = [0] * maxL
lis.sort()
for k in lis:
    t[k] += 1
    if t[k] == 1:
        for p in range(k * 2, maxL, k):
            t[p] += 2
print(t.count(1))
import math
from bisect import bisect
x1,y1,x2,y2 = map(int,input().split())
N = int(input())
src = [tuple(map(int,input().split())) for i in range(N)]
src.sort()
if x1 > x2:
    x1,x2 = x2,x1
    y1,y2 = y2,y1

arc = 5 * math.pi

if x1 == x2:
    if y1 > y2:
        y1,y2 = y2,y1
    ans = 100 * (y2-y1)
    for x,y in src:
        if x == x1 and y1 < y < y2:
            ans += arc*2 - 20
            break
    print(ans)
    exit()

if y1 == y2:
    if x1 > x2:
        x1,x2 = x2,x1
    ans = 100 * (x2-x1)
    for x,y in src:
        if y == y1 and x1 < x < x2:
            ans += arc*2 - 20
            break
    print(ans)
    exit()

assert x1 < x2

if y1 < y2:
    lis = []
    for x,y in src:
        if x < x1: continue
        if x > x2: break
        if not y1 <= y <= y2: continue
        i = bisect(lis, y)
        if i == len(lis):
            lis.append(y)
        else:
            lis[i] = y
    ans = 100 * (x2-x1 + y2-y1)
    ans += len(lis) * (arc - 20)
    print(ans)
else:
    lds = []
    for x,y in src:
        if x < x1: continue
        if x > x2: break
        if not y2 <= y <= y1: continue
        print(x,y,i)
        if i == 0:
            lds.append(y)
        else:
            lds[-i] = y
    ans = 100 * (x2-x1 + y1-y2)
    ans += len(lds) * (arc - 20)
    print(ans)

### FIXED CODE ###

import math
from bisect import bisect
x1,y1,x2,y2 = map(int,input().split())
N = int(input())
src = [tuple(map(int,input().split())) for i in range(N)]
src.sort()
if x1 > x2:
    x1,x2 = x2,x1
    y1,y2 = y2,y1

arc = 5 * math.pi

if x1 == x2:
    if y1 > y2:
        y1,y2 = y2,y1
    ans = 100 * (y2-y1)
    for x,y in src:
        if x == x1 and y1 < y < y2:
            ans += arc*2 - 20
            break
    print(ans)
    exit()

if y1 == y2:
    if x1 > x2:
        x1,x2 = x2,x1
    ans = 100 * (x2-x1)
    for x,y in src:
        if y == y1 and x1 < x < x2:
            ans += arc*2 - 20
            break
    print(ans)
    exit()

if y1 < y2:
    lis = []
    for x,y in src:
        if x < x1: continue
        if x > x2: break
        if not y1 <= y <= y2: continue
        i = bisect(lis, y)
        if i == len(lis):
            lis.append(y)
        else:
            lis[i] = y
    ans = 100 * (x2-x1 + y2-y1)
    if len(lis) in (x2-x1+1, y2-y1+1):
        ans += (len(lis)-1) * (arc - 20)
        ans += arc*2 - 20
    else:
        ans += len(lis) * (arc - 20)
    print(ans)
else:
    lds = []
    for x,y in src:
        if x < x1: continue
        if x > x2: break
        if not y2 <= y <= y1: continue
        i = bisect(lds, -y)
        if i == len(lds):
            lds.append(-y)
        else:
            lds[i] = -y
    ans = 100 * (x2-x1 + y1-y2)
    if len(lds) in (x2-x1+1, y1-y2+1):
        ans += (len(lds)-1) * (arc - 20)
        ans += arc*2 - 20
    else:
        ans += len(lds) * (arc - 20)
    print(ans)
a = list(map(int, input().split()))
def lcm(x, y):

print(lcm(a[0], a[1]))


### FIXED CODE ###

import fractions
a = list(map(int, input().split()))
print(a[0]*a[1] // fractions.gcd(a[0], a[1]))