Harryxun/stf_run huggingface dataset:
# encoding: "utf-8"

from collections import defaultdict

# class Stdin:
#     @staticmethod
#     def read_line(converter=str):
#         return [converter(x) for x in input().split()]
    
#     @staticmethod
#     def read_lines(n, converter=str):
#         result = list()
#         for _ in range(n):
#             result.append(Stdin.read_line(converter))
#         return result
    
#     @staticmethod
#     def convert(data, converter):
#         assert(len(data) == len(converter))
#         return tuple(map(lambda x, f: f(x), data, converter))

#     @staticmethod
#     def convert_lines(datas, n, converter):
#         return [converter(data, n, converter) for data in datas]


def first_count_and_pop(xs):
    cnt = 0
    fst = xs[0]
    # cnt = xs.count(fst)
    for x in xs:
        if x != fst:
            break
        cnt += 1
    return (cnt, i)    
    

def main():
    _ = input()
    # xs = Stdin.read_line(converter=int)
    xs = [int(x) for x in input().split()]
    xs.sort()
    ys = defaultdict(int)
    i = 0
    j = len(xs)
    while i < j:
        key = xs[i]
        cnt, i = first_count_and_pop(xs[i:])
        ys[key] += cnt
        ys[key-1] += cnt
        ys[key+1] += cnt

    print(max(ys.values()))

# def main_():
#     input()
#     xs = Stdin.read_line(converter=int)
#     xs.sort()
#     counts = list()
#     for i in range(100000):
#         if not xs:
#             counts.extend([0] * (100000 - len(counts)))
#             break     
#         elif i == xs[0]:
#             cnt, xs = first_count_and_pop(xs)
#             counts.append(cnt)
#         else:
#             counts.append(0)
#     m = 0
#     for i in range(0, 100000):
#         if i == 0:
#             temp = counts[i] + counts[i+1]
#         elif i == 100000 - 1:
#             temp = counts[i-1] + counts[i]
#         else:
#             temp = counts[i-1] + counts[i] + counts[i+1]
#         if m < temp:
#             m = temp
#     print(m)

if __name__ == "__main__":
    main()

### FIXED CODE ###

input()
a_list = [int(s) for s in input().split()]

count = [0]*100002

for a in a_list:
    count[a] += 1
    count[a+1] += 1
    count[a+2] += 1
    
print(max(count))
Q = 10**9 + 7
'''
def factorial(n):
    if n == 0:
        return 1
    else:
        return (n * factorial(n-1))%Q
'''
N, M = map( int, input().split())
N, M = min(N, M), max(N, M)
if N == M or N+1 == M:
    NN = 1
    MM = 1
    for i in range(1,N+1):
        NN = (NN*i)%Q
    if N == M:
        ans = (2*NN*NN)%Q
elif N+1 == M:
    ans = (NN*NN*M)%Q
else:
    ans = 0
print(ans)

### FIXED CODE ###

Q = 10**9 + 7
'''
def factorial(n):
    if n == 0:
        return 1
    else:
        return (n * factorial(n-1))%Q
'''
N, M = map( int, input().split())
N, M = min(N, M), max(N, M)
if N == M or N+1 == M:
    NN = 1
    MM = 1
    for i in range(1,N+1):
        NN = (NN*i)%Q
    if N == M:
        ans = (2*NN*NN)%Q
    elif N+1 == M:
        ans = (NN*NN*M)%Q
else:
    ans = 0
print(ans)
N, M = map(int, input().split())
s = [list(map(int, list(input().split()))) for i in range(M)]

ans = [-1] * M
for i in s:
    if ans[i[0] - 1] != -1 and ans[i[0] - 1] != i[1]:
        print(-1)
        exit()
    ans[i[0] - 1] = i[1]

ans = [int(str(a).replace('-1', '0')) for a in ans]
res = ''.join((map(str, ans)))
if int(res) > 0 and len(res) == N:
    print(int(res))
else:
    print(-1)

### FIXED CODE ###

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

ans = [-1] * N

for i in s:
    if ans[i[0] - 1] != -1 and ans[i[0] - 1] != i[1]:
        print(-1)
        exit()
    ans[i[0] - 1] = i[1]

if M == 0 and N != 1:
    ans[0] = 1
tmp = int(''.join((map(str, [int(str(a).replace('-1', '0')) for a in ans]))))
if N >= 2 and ans[0] == -1:
    ans[0] = 1

ans = [int(str(a).replace('-1', '0')) for a in ans]

res = ''.join((map(str, ans)))
if int(res) >= 0 and len(str(int(res))) == N:
    print(int(res))
else:
    print(-1)
import math
x = map(raw_input().split(' '))
a = math.log10(x[0] + x[1])
print(int(a)+1)

### FIXED CODE ###

while True:
	try:
		a,b = map(int,raw_input().split(' '))
		print len(str(a+b))
	except: break
coding:utf-8
H, W = list(map(int, input().split()))
s = []
ans = []
for i in range(H):
    s.append(input())
    ans.append([])
for i in range(H):
    for j in range(W):
        if(s[i][j] == "#"):
            ans[i].append("#")
            continue
        ans[i].append(0)

for i in range(H):
	for j in range(W):
		if s[i][j] == '#':
			for h in range(-1,2):
				for k in range(-1,2):
					if h == 0 and k == 0:
						continue
					if (i == 0 and h == -1) or (i == H -1 and h == 1) or (j == 0 and k == -1) or (j == W-1 and k == 1):
						continue

					if (s[i+h][j+k]) != '#':
 						ans[i+h][j+k] += 1  
			ans[i][j] = '#'
		
print (ans)

### FIXED CODE ###

# coding:utf-8
H, W = list(map(int, input().split()))
s = []
ans = []
for i in range(H):
    s.append(input())
    ans.append([])
for i in range(H):
    for j in range(W):
        if(s[i][j] == "#"):
            ans[i].append("#")
            continue
        ans[i].append(0)

for i in range(H):
	for j in range(W):
		if s[i][j] == '#':
			for h in range(-1,2):
				for k in range(-1,2):
					if h == 0 and k == 0:
						continue
					if (i == 0 and h == -1) or (i == H -1 and h == 1) or (j == 0 and k == -1) or (j == W-1 and k == 1):
						continue

					if (s[i+h][j+k]) != '#':
 						ans[i+h][j+k] += 1  
			ans[i][j] = '#'

o = ""
for i in range(H):
	for j in range(W):
		o += str(ans[i][j])
	o += "\n"
print (o)
def fib(n):
    a, b = 1, 1
    if n == 1:
        return a
    elif n == 2:
        return b
    else:
        for i in range(n-2):
            a, b = b, a + b
        return b

n,m = map(int,input().split())
a = [int(input()) for i in range(m)]
ans = fib(a[0])
for j in range(1,m):
    if m == 1:
        continue
    elif a[j] == a[j-1]+1:
        ans = 0
    else:
        ans *= fib(a[j]-a[j-1]-1)
ans *= fib(n-a[m-1])
print(ans%1000000007)


### FIXED CODE ###

def fib(n):
    a, b = 1, 1
    if n == 1:
        return a
    elif n == 2:
        return b
    else:
        for i in range(n-2):
            a, b = b, a + b
        return b

n,m = map(int,input().split())
if m != 0:
  a = [int(input()) for i in range(m)]
  ans = fib(a[0])
  for j in range(1,m):
    if m == 1:
        continue
    elif a[j] == a[j-1]+1:
        ans = 0
    else:
        ans *= fib(a[j]-a[j-1]-1)
  ans *= fib(n-a[m-1])
else:
  ans = fib(n+1)
print(ans%1000000007)
import sys
import collections


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    d = collections.deque(list("keyence"))
    s = str(input().rstrip('\n'))
    for i in range(len(s)):
        if len(p) == 0:
            break
        else:
            p = d.popleft()
            if p != s[i]:
                d.appendleft(p)
    print("YES" if len(d) == 0 else "NO")


if __name__ == '__main__':
    solve()


### FIXED CODE ###

import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    s = list(str(input().rstrip('\n')))
    for i in range(len(s)):
        for j in range(i + 1, len(s)):
            if "".join(s[:i + 1] + s[j:]) == "keyence":
                print("YES")
                exit()
    print("NO")


if __name__ == '__main__':
    solve()
a, b = int(input().split())
print((a-1) * (b - 1))

### FIXED CODE ###

n,m=map(int,input().split())
print((n-1)*(m-1))
A, B = map(int, input().split())
Amin = A/0.08
Amax = int((A+1)/0.08)+1
Arange = set(range(Amin, Amax))
Bmin = B/0.1
Bmax = int((B+1)/0.1)+1
Brange = set(range(Bmin, Bmax))
intersection = Arange & Brange
if len(intersection) > 0:
  print(min(intersection))
else:
  print("-1")

### FIXED CODE ###

A, B = map(int, input().split())
def calc(A, B):
  Amin = A/0.08
  if (Amin - int(Amin)) != 0.:
    Amin = int(Amin)+1
  else:
    Amin = int(Amin)
  Amax = int((A+1)/0.08)
  Arange = set(range(Amin, Amax))
  Bmin = B/0.1
  if (Bmin - int(Bmin)) != 0.:
    Bmin = int(Bmin)+1
  else:
    Bmin = int(Bmin)
  Bmax = int((B+1)/0.1)
  Brange = set(range(Bmin, Bmax))
  intersection = Arange & Brange
  print(-1) if len(intersection) == 0 else print(min(intersection))
calc(A, B)
n=int(input())
a=[[]for i in range(n)]
for i in range(n-1):
    c,d=map(int,input().split())
    a[c-1].append([d-1,i])
c=[0]*(n-1)
def f(x,y):
    r=1
    for i in a[x]:
        if r==y:
            r+=1
        c[i[1]]=r
        f(i[0],r)
        r+=1
f(0,0)
print(max(c))
for i in c:
    print(i)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
n=int(input())
s=[[]for i in range(n+1)]
t=[0]*(n-1)
for i in range(n-1):
    a,b=map(int,input().split())
    s[a-1].append([b-1,i])
def f(x,r):
    c=1
    for (i,j) in s[x]:
        if c==r:
            c+=1
        t[j]=c
        f(i,c)
        c+=1
f(0,0)
print(max(t))
for i in t:
    print(i)
#coding: utf-8
import numpy as np
N, M = map(int, input().split())
AB = np.array([list(map(int, input().split())) for _ in range(N)])
money = 0
col_num = 0
AB = AB[np.argsort(AB[:, col_num])]
print(AB)
if M <= AB[np.argmin(AB[:, 0]), 1]:
    money += AB[0, 0] * M
else:
    i = 0
    while M >= 0:
        money += AB[i, 0] * AB[i, 1]
        M -= AB[i, 1]
        if M < 0:
          money += AB[i, 0] * M
        i += 1
print(money)

### FIXED CODE ###

#coding: utf-8
import numpy as np
N, M = map(int, input().split())
AB = np.array([list(map(int, input().split())) for _ in range(N)])
money = 0
col_num = 0
AB = AB[np.argsort(AB[:, col_num])]
if M <= AB[np.argmin(AB[:, 0]), 1]:
    money += AB[0, 0] * M
else:
    i = 0
    while M > 0:
        money += AB[i, 0] * AB[i, 1]
        M -= AB[i, 1]
        if M <= 0:
          money += AB[i, 0] * M
        i += 1
print(money)
import math
N = int(input())
S_t = 1
for i in range(N):
    t = int(input())
    S_t =  S_t * t // math.gcd(S_t,t)

print(S_t)

### FIXED CODE ###

import fractions
N = int(input())
S_t = 1
for i in range(N):
    t = int(input())
    S_t = S_t * t // fractions.gcd(S_t,t)

print(S_t)
n = int(input())
a = [int(e) for e in input().split()]

print('Yes' if max(a)>= sum([e for e in a]-max(a)) else 'No')

### FIXED CODE ###

n = int(input())
a = [int(e) for e in input().split()]

ans ='No' if max(a)>= sum([e for e in a])-max(a) else 'Yes'
print(ans)
import math
x1,y1,x2,y2 = map(int, input().split())
print(math.sqrt((x1-x2)**2+(y1-y2)**2))

### FIXED CODE ###

import math
x1,y1,x2,y2 = map(float, input().split())
print(math.sqrt((x1-x2)**2+(y1-y2)**2))
s = input()
n = int(input())

def f(s):
    prev = ''
    ct = 0
    for i in s:
        if i == prev:
            ct += 1
            prev = ''
        else:
            prev = i
    return ct
        

if len(set(s)) == 1:
    print(len(s) *n //2)
elif s[0]!=s[-1]:
    print(f(t) * n)
else:
    ct = f(s*2)
    
    ans = ct * (n//2) if n % 2 == 0 else ct*(n//2) + f(s)
    
    print(ans)


### FIXED CODE ###

s = input()
n = int(input())

def f(s):
    prev = ''
    ct = 0
    for i in s:
        if i == prev:
            ct += 1
            prev = ''
        else:
            prev = i
    return ct
        

if len(set(s)) == 1:
    print(len(s) *n//2)
elif s[0]!=s[-1]:
    print(f(s) * n)
else:
    ans = f(s) + (f(s*2) - f(s)) * (n-1)
    print(ans)
n = int(input())
v = list(map(int,input().split()))
a = []
x = []
b = []
y = []

for i in range(n):
        if i%2==1:
                if v[i] in a:
                        x[a.index(v[i])] += 1
                else:
                        a.append(v[i])
                        x.append(1)
        else:
                if v[i] in b:
                        y[b.index(v[i])] += 1
                else:
                        b.append(v[i])
                        y.append(1)

if a[x.index(max(x))] != b[y.index(max(y))]:
        x=sorted(x)[::-1]
        y=sorted(y)[::-1]

        sumx = sum(x)
        sumy = sum(y)

        changea = sumx-x[0]
        changeb = sumy-y[0]
        print(changea + changeb)
else:  
        x=sorted(x)[::-1]
        y=sorted(y)[::-1]
        sumx = sum(x)
        sumy = sum(y)

        ans1 = sumx-x[0] + sumy-y[1]
        ans2 = sumx-x[1] + sumy-y[0]
        print(min(ans1,ans2))

### FIXED CODE ###

import collections
n = int(input())
v = list(map(int,input().split()))
a = v[0::2]
b = v[1::2]
a = collections.Counter(a)
a = a.most_common()
b = collections.Counter(b)
b = b.most_common()
c = n//2
if a[0][0] != b[0][0]:
    ans = c-a[0][1] + c-b[0][1]
    print(ans)
else: 
    if len(a) == 1:
        tmpa = 0
    else:
        tmpa = a[1][1]
    if len(b) == 1:
        tmpb = 0
    else:
        tmpb = b[1][1]
    ans1 = c-tmpa + c-b[0][1]
    ans2 = c-a[0][1] + c-tmpb
    print(min(ans1,ans2))
o = input()
e = input()
ans = ""
for i in range(len(o)):
    ans += o[i] + e[i]
print(ans)

### FIXED CODE ###

o = input()
e = input()
ans = ""
for i in range(len(e)):
    ans += o[i] + e[i]
if len(o) > len(e):
    ans += o[-1]
print(ans)
s,t=list(input()),list(input())
n=len(s)
num=0
for j in range(n):
        if s[0]==t[j] and (s[1]==t[j+1] or s[-1]==t[j-1]):
            num=j
ans_t=[]
for i in range(num):
    ans_t.append(s[n-num+i])
for i in range(n-num):
    ans_t.append(s[i])
print('Yes' if t==ans_t or s==t else 'No')


### FIXED CODE ###

s,t=list(input()),list(input())
n=len(s)
num=0
ans_t=[]
if s[0]==t[-1] and s[1]==t[0]:
    ans_t=s[1:]+[s[0]]
else:
    for j in range(n-1):
        if s[0]==t[j] and s[1]==t[j+1]:
            num=j
            for i in range(num):
                ans_t.append(s[n-num+i])
            for i in range(n-num):
                ans_t.append(s[i])
print('Yes' if t==ans_t or s==t else 'No')
import math
from functools import reduce
N = int(input())
A = input().split()
A = [int(a) for a in A]
B = []
for n in range(N):
  for i in range(1:(10^9)-1):
    A[n] = i
    b = reduce(math.gcd, A)
    B.append(b)
B_max = max(b)
print(B_max)

### FIXED CODE ###

# PDF解説
N = int(input())
A = [int(a) for a in input().split()]

import fractions

L = []
# [gcd(0), gcd(0, A[0]), ... , gcd(0, A[0], A[1], ..., A[N-2])]
R = []
# [gcd(A[1], A[2], ... , A[N-1], 0), gcd(A[2], A[3], ... , A[N-1], 0), ... , gcd(0)]

L.append(0)
for i in range(0, N-1, 1):
  l = fractions.gcd(L[-1], A[i])
  L.append(l)

R.append(0)
for j in range(N-1, 0, -1):
  r = fractions.gcd(R[-1], A[j])
  R.append(r)
R.reverse()

ans = 0
for n in range(N):
  lr = fractions.gcd(L[n], R[n])
  ans = max(ans, lr)

print(ans)
data = [int(n) for n in input().split(" ")];

def gcd(m, n):
    m = m % n;
    if m == 0:
        return n;
    return gcd(n, m);

print(gcd(max(data), min(data));


### FIXED CODE ###

data = [int(n) for n in input().split(" ")];

def gcd(m, n):
    m = m % n;
    if m == 0:
        return n;
    return gcd(n, m);

print(gcd(max(data), min(data)));
n = int(input())
a = list(map(int,input().split()))
h = sum(a)
ans = 0
for i in range(n):
  h -= a[i]
  ans = (ans + (a[i]*(h))%(10**9+7)
print(ans)
 



### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
h = sum(a)
ans = 0
for i in range(n):
  h -= a[i]
  ans += a[i]*(h)
print(ans%(10**9+7))
n,k,x,y = (int(iinput())for i in [0]*4)
if k <= n:
    print(k*(x-y)+n*y)
else:
    print(n*x)


### FIXED CODE ###

n,k,x,y = (int(input())for i in [0]*4)
if k <= n:
    print(k*(x-y)+n*y)
else:
    print(n*x)
import sys
N = int(input())
s = str(input())
t = str(input())

word = s + t

for letter in s:
  if letter not in letter_list:
    letter_list.append(letter)
    
for letter in t:
  if letter not in list(letter_dict.keys()):
    letter_dict[letter] = 1
    
if s == t:
  print(N)
  sys.exit()
else:
  print(len(letter_dict))

### FIXED CODE ###

import sys
N = int(input())
s = str(input())
t = str(input())

answer = 2 * N
for i in range(N, 2 * N + 1):
    if s[len(s) - (2 * N - i):] == t[:2 * N - i]:
        answer = i
        break
    
print(answer)
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)


n,x = map(int, input().split())
city = list(map(int,input().split()))

for i in range(n):
    city[i] = abs(city[i]-x)

print(gcd_list(city))

### FIXED CODE ###

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

n,x = map(int, input().split())
city = list(map(int,input().split()))

for i in range(n):
    city[i] = abs(city[i]-x)

ans = city[0]
for num in city:
    ans = gcd(ans, num)

print(ans)
PI = 3.141
r = int(input())
print(2*1PI*r)

### FIXED CODE ###

PI = 3.141
r = int(input())
print(2*PI*r)
from itertools import accumulate
from collections import Counter
N = int(input())
Alist = [0]+list(map(int, input().split()))
cumsum = Counter(sorted(list(accumulate(Alist)))).most_common()
ans = 0

for k, v in cumsum:
    if v > 1:
        ans += n*(n-1)//2
    else:
        break
print(ans)


### FIXED CODE ###

from itertools import accumulate
from collections import Counter
N = int(input())
Alist = [0]+list(map(int, input().split()))
cumsum = Counter(sorted(list(accumulate(Alist)))).most_common()
ans = 0

for k, v in cumsum:
    if v > 1:
        ans += v*(v-1)//2
    else:
        break
print(ans)
def rem(x,r):
  if (x,r) == (1,0):
    return [[1]]
  if x <= 2*r:
    return -1
  ret = []
  for i in range(1,x+1):
    if x%i == r:
      ret.append([i])
    else:
      s = rem(x%i,r)
      if s == -1:
        continue
      else:
        for j in s:
          if j == -1:
            continue
          elif j[-1] < i:
            ret.append([i]+j)
          else:
            ret.append([i]+j)
  return ret
n = int(input())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
for xx,yy in zip(x,y):
  if xx != yy and rem(xx,yy) == -1:
    print(-1)
    exit()
ls = [rem(xx,yy) if xx != yy else 0 for xx,yy in zip(x,y)]
flg = [0]*n
def findmx(lsi,ansst,mx):
  ret = 100
  if lsi == 0:
    return 0
  for lsls in lsi:
    for j in lsls:
      if j > mx:
        return min(j,ret)
      elif j in ansst:
        continue
      else:
        ret = min(j,ret)
        break
    else:
      return 0
mxls = [ls[i][0][0] if type(ls[i]) == list else 0 for i in range(n)]
mx = max(mxls)
ansst = set((mx,))
mxcand = mx
while mxcand:
  for i in range(n):
    t = findmx(ls[i],ansst,mx)
    mxls[i] = t
    if t == 0:
      flg[i] = 1
  mxcand = max(mxls)
  ansst.add(mxcand)
  if flg.count(1) == n:
    break
ans = 0
for b in ansst:
  if b:
    ans += 2**b
print(ans)

### FIXED CODE ###

def rem(x,r):
  if (x,r) == (1,0):
    return [[1]]
  if x <= 2*r:
    return -1
  ret = []
  for i in range(1,x+1):
    if x%i == r:
      ret.append([i])
    else:
      s = rem(x%i,r)
      if s == -1:
        continue
      else:
        for j in s:
          if j == -1:
            continue
          elif j[-1] < i:
            ret.append([i]+j)
          else:
            ret.append([i]+j)
  return ret
n = int(input())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
for xx,yy in zip(x,y):
  if xx != yy and rem(xx,yy) == -1:
    print(-1)
    exit()
ls = [rem(xx,yy) if xx != yy else 0 for xx,yy in zip(x,y)]
flg = [0]*n
def findmx(lsi,ansst,mx):
  ret = 100
  if lsi == 0:
    return 0
  for lsls in lsi:
    for j in lsls:
      if j > mx:
        return min(j,ret)
      elif j in ansst:
        continue
      else:
        ret = min(j,ret)
        break
    else:
      return 0
  else:
    return ret
    
mxls = [ls[i][0][0] if type(ls[i]) == list else 0 for i in range(n)]
mx = max(mxls)
ansst = set((mx,))
mxcand = mx
while mxcand:
  for i in range(n):
    t = findmx(ls[i],ansst,mx)
    mxls[i] = t
    if t == 0:
      flg[i] = 1
  mxcand = max(mxls)
  ansst.add(mxcand)
  if flg.count(1) == n:
    break
ans = 0
for b in ansst:
  if b:
    ans += 2**b
print(ans)
from collections import Counter

n = input()
v=list(map(int,input().split()))
a=Counter(v[0::2]).most_common()
b=Counter(v[1::2]).most_common()
a.append([0,0])
b.append([0,0])
if a[0][0]!=b[0][0]:
    print(n-(a[0][1]+b[0][1]))
else:
    print(min(n-(a[1][1]+b[0][1]),n-(a[0][1]+b[1][1])))

### FIXED CODE ###

from collections import Counter

n = int(input())
v=list(map(int,input().split()))
a=Counter(v[0::2]).most_common()
b=Counter(v[1::2]).most_common()
a.append([0,0])
b.append([0,0])
if a[0][0]!=b[0][0]:
    print(n-(a[0][1]+b[0][1]))
else:
    print(min(n-(a[1][1]+b[0][1]),n-(a[0][1]+b[1][1])))
import numpy as np
import itertools
 
H, W, K = list(map(int, input().split())) 
C = []
for i in range(H):
    C.append([input().replace(".","0").replace("#","1")])

C_arr = np.array(C)
 
In = np.array(list(itertools.product([0,1] , repeat=H)))
Out = np.array(list(itertolls.product([0,1] , repeat=W)))
 
ans = 0
for i in range(2**H):
  for j in range(2**W):
    In_matrix = np.diag(In[i])
    Out_matrix = np.diag(Out[j])
    
    In_C = np.dot(In_matrix , C_arr)
    In_C_Out = np.dot(In_C , Out_matrix)
    
    ICO = In_C_Out.flatten()
    ICO = ICO.tolist()
    
    if ICO.count(1) == K:
      ans += 1
      
print(ans)

### FIXED CODE ###

H, W, K = list(map(int, input().split()))
 
c = [list(input()) for i in range(H)]
 
cnt = 0
for i in range(2**H):
    for j in range(2**W):
        cnt_black = 0
        for k in range(H):
            if (i >> k) & 1:
                continue
            for l in range(W):
                if (j >> l) & 1:
                    continue
                if c[k][l] == '#':
                    cnt_black += 1
        if cnt_black == K:
            cnt += 1
 
print(cnt)
n=int(input())
a=[-1,-1]+list(map(int,input().split()))
cnt=[0]*(n+1)
for i in range(2,n+1):
    cnt[a[i]+=1
    
for i in range(1,n+1):
    print(cnt[i])

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
cnt=[0]*n
for i in range(0,n-1):
    cnt[a[i]-1]+=1
for i in range(0,n):
    print(cnt[i])
A,B,K = map(int,input().split())
num = []
for i in range(1,min(A,B)):
    if A%i == 0 and B%i == 0:
        num.append(i)
pritn(num[-K])

### FIXED CODE ###

A,B,K = map(int,input().split())
num = []
for i in range(1,min(A,B)+1):
    if A%i == 0 and B%i == 0:
        num.append(i)
print(num[-K])
ans = "No"
if int(input()) + int(input()) >= int(input()):
  ans = "Yes"
print(ans)

### FIXED CODE ###

ans = "No"
a, b, c = [ int(v) for v in input().split() ]
if a + b >= c:
  ans = "Yes"
print(ans)
n = int(input())
s = list(str(input()))

for i in range(len(s)):
    tmp = ord(s[i]) + n
    if tmp > ord('Z')
        s[i] = chr(tmp - ord('Z'))
    else:
        s[i] = chr(tmp)

ans = ''
for i in range(len(s)):
    ans += s[i]

print(ans)

### FIXED CODE ###

n = int(input())
s = list(str(input()))

for i in range(len(s)):
    tmp = ord(s[i]) + n
    if tmp > ord('Z'):
        tmp -= ord('Z') - ord('A') + 1
    s[i] = chr(tmp)

ans = ''
for i in range(len(s)):
    ans += s[i]

print(ans)
a = int(input())
sam = 0
b = 0
for i in range(a):
  b = int(input())
  sam += pow(b, -1)
print(pow(sam, -1)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
sam = 0
for i in range(N):
  sam += A[i]**-1
print(sam**-1)
n,k=map(int,input().split())
p=998244353
r=range
f=[1]
for i in r(k):f+=[-~i*f[i]%p]
a=1<<~-k
for i in r(min(n-1,k)):a-=f[k-1]*pow(f[i]*f[k-1-i],-1,p)
print(a%p)

### FIXED CODE ###

n,k=map(int,input().split())
p=998244353
r=range
f=[1]
for i in r(k):f+=[-~i*f[i]%p]
a=0
for i in r(n-1,k):a+=f[k-1]*pow(f[i]*f[k-1-i],-1,p)
print(a%p)
counter = 0
while 1:
  i = int(input())
  if i == 0:
    break
  counter++
  print("Case {0}: {1}".format(counter, i)

### FIXED CODE ###

counter = 0
while 1:
  i = int(input())
  if i == 0:
    break
  counter += 1
  print("Case {0}: {1}".format(counter, i))
limit = int(input())
string = input()

if limit <= len(string):
    ans = string[:limit] + '...'

print(ans)

### FIXED CODE ###

limit = int(input())
string = input()

if limit < len(string):
    string = string[:limit] + '...'

print(string)
import numpy as np
a, b = map(int, input().split(' '))
c = np.lcm(a, b)
print(str(c))

### FIXED CODE ###

def gcd(x, y):
    while y != 0:
        x, y = y, x % y
    return x

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

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