Harryxun/stf_run huggingface dataset:
import math
import bisect


prime = [2,3,5,7,11,13,17,19]
for i in range(prime[-1]+2,100000,2):

    x = int( math.sqrt(i) )
    x += 1 if x%2 == 0 else 0

    found = False
    for p in prime:
        if x < p:
            break;

        if i % p == 0:
            found = True
            break
                
    if not found:
        prime.append(i)


#print(prime)
#import matplotlib.pyplot as plt
#size = 10000
#plt.scatter(range(0,size),prime[0:size])
#plt.plot(prime)
#plt.show()

for i in range(len(prime)):
#    if 2.5*i - 1< prime[i]:
#       continue

    if prime[i] <11 *i + 3:
        continue

    print(prime[i])



q = int(input())

def low(x:int)->int:
    x = (x -3)// 11
    return x if x>0 else 0

def hi(x:int)->int:
    return int( (x+1)//2.5) + 1

for _ in range(q):

    l, r = map(int,input().split())
 #   l += 1 if l%2 == 0 else 0

#    print((l,r))

    ans = 0
    for i in range( l , r+1, 2):

        low_1 = low(i)
        hi_1 = hi(i)

        #print((low_1,hi_1))
        xi = bisect.bisect_right(prime, i,lo = low_1,hi = hi_1)
        #print(xi)
        p1 = prime[xi-1]
        if p1 != i:
            continue

        i2 = (i+1)//2
        low_2 = low(i2)
        hi_2 = hi(i2)

        yi = bisect.bisect_right(prime, i2,lo = low_2, hi = min(hi_2,xi) )
        if prime[yi-1] != i2:
            continue

        ans += 1

    print(ans)

### FIXED CODE ###


import math
import bisect


prime = [2]

tab = [False]*100001
tab[2] = True
for i in range(3,100000+1,2):

    x = int( math.sqrt(i) )
    x += 1 if x%2 == 0 else 0

    found = False
    for p in prime:
        if x < p:
            break;

        if i % p == 0:
            found = True
            break
                
    if not found:
        prime.append(i)
        tab[i] = True

#print(prime[0:10])
#print(tab[0:10])
q = int(input())

ac = [0] * len(tab)

for i in range(1,len(ac)):
    ac[i] = ac[i-1] + (1 if tab[i] and tab[(i+1)//2] else 0)

#print(ac)
for _ in range(q):

    l, r = map(int,input().split())
    
    ans = ac[r] - ac[l-1]

    print(ans)
a,b,c = int(input().split())
if a=b=c:
  print(1)
elif (a=b or b=c or a=c):
  print(2)
else:
  print(3)


### FIXED CODE ###

a,b,c = map(int,input().split())
if a==b and b==c:
  print(1)
elif a==b or b==c or a==c:
  print(2)
else:
  print(3)
A,B,C=map(int, input().split())
if A<C and C<B:
  print(Yes)
else:
  print(No)

### FIXED CODE ###

A,B,C=map(int, input().split())
if A<=C and C<=B:
  print("Yes")
else:
  print("No")
N,M = map(int,input())
# can't understand meaning
if N == 1 and M == 1:
  ans = 1
elif N == 1 or M == 1:
  ans = max(N,M) -2
else:
  ans = (N-2)*(M-2)
print(ans)

### FIXED CODE ###

#!/usr/bin/env python3
n,m = map(int,input().split())
if n == 1 and m == 1:
    print(1)
elif n == 1 or m == 1:
    print(max(n,m)-2)
else: print((n-2)*(m-2))
X,Y = map(int,input().split())
# 何回移動するか
r = (X+Y)//3
# 移動の可能性 rC(x-r)
from functools import reduce
mod = 10**9+7
if (X+Y)%3==0:
    r = (X+Y)//3
    if r != X and r != Y:
        num = reduce(lambda x,y:x*y%mod,[k+1 for k in range(r)])
        p = reduce(lambda x,y:x*y%mod,[k+1 for k in range(X-r)])
        q = reduce(lambda x,y:x*y%mod,[k+1 for k in range(2*r-X)])
        ans = num*pow(p,mod-2,mod)*pow(q,mod-2,mod)%mod
        print(ans%mod)  
    else:
        print(1)
else:
    print(0)

### FIXED CODE ###

X,Y = map(int,input().split())
# 何回移動するか
r = (X+Y)//3
# 移動の可能性 rC(x-r)
from functools import reduce
mod = 10**9+7

if (X+Y)%3==0 and X<= 2*Y and Y<= 2*X :
    r = (X+Y)//3
    l = min
    if r != X and r != Y:
        num = reduce(lambda x,y:x*y%mod,[k+1 for k in range(r)])
        p = reduce(lambda x,y:x*y%mod,[k+1 for k in range(X-r)])
        q = reduce(lambda x,y:x*y%mod,[k+1 for k in range(2*r-X)])
        ans = num*pow(p,mod-2,mod)*pow(q,mod-2,mod)%mod
        print(ans%mod)   
    else:
        print(1)
else:
    print(0)
a=bin(input()+(1<<60))[2:]
b=bin(input()+(1<<60))[2:]
while a[0]==b[0]:
	a=a[1:]
	b=b[1:]
assert a[0]=="0" and b[0]=="1"
result=int("1"+"0"*(len(a)-1), 2)-int(a, 2)
b=b[1:]
while b and b[0]=="0":
	b=b[1:]
if not b:
	result=result*2+1
else:
	b="1"*len(b)
	if int(b, 2)>=int(a, 2):
		result+=(1<<(len(a)-1))
	else:
		result=result*2+int(b, 2)+1
print result

### FIXED CODE ###

a=bin(input()+(1<<60))[2:]
b=bin(input()+(1<<60))[2:]
if a==b:
	print 1
	exit()
while a[0]==b[0]:
	a=a[1:]
	b=b[1:]
assert a[0]=="0" and b[0]=="1"
result=int("1"+"0"*(len(a)-1), 2)-int(a, 2)
b=b[1:]
while b and b[0]=="0":
	b=b[1:]
if not b:
	b=0
else:
	b=(1<<len(b))-1
if b>=int(a, 2):
	result+=(1<<(len(a)-1))
else:
	result=result*2+b+1
print result
n = int(input())
sche = []
for i in range(n):
    a,b = map(int,input().split())
    sche.append((b,a))
sche.sort(reverse = True)
now = 1e18
for dead,ti in :
    if(dead > now):
        dead = now
    now -= ti

if now < 0:
    print("No")
else:
    print("Yes")


### FIXED CODE ###

n = int(input())
sche = []
for i in range(n):
    a,b = map(int,input().split())
    sche.append((b,a))
sche.sort(reverse = True)
now = 1e18
for dead,ti in sche:
    if(dead < now):
        now = dead
    now -= ti

if now < 0:
    print("No")
else:
    print("Yes")
import fractions as math

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

#同じく最小公倍数
def lcmlist(l):
    a = l[0]
    for i in range(len(l)):
        a = int(a)
        a = a*l[i]/math.gcd(a,l[i])
    return int(a)

if n == 1:
    print(list1[0]-1)

lcm = lcmlist(list1)
lcm -= 1
ans = 0
for i in list1:
    ans += lcm%i

print(ans)


### FIXED CODE ###

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

ans = 0
for i in list1:
    ans += i-1
print(ans)
a, b = (int(i) for i in input().split()) 

list=[]
 
for i in range(a):
    list.append(int(input()))

new_list = sorted(list)

sabun = None

for i in range(len(new_list)):

    if b - i < 1:
        break

    bbb = new_list[i+b-1] - new_list[i]

    if sabun == None:
        sabun = bbb
        continue

    if sabun > bbb:
        sabun = bbb
    
print(sabun)

### FIXED CODE ###

a, b = (int(i) for i in input().split()) 

list=[]
 
for i in range(a):
    list.append(int(input()))

new_list = sorted(list)

sabun = None

for i in range(len(new_list)):

    bbb = new_list[i+b-1] - new_list[i]

    if sabun == None:
        sabun = bbb
        continue

    if sabun > bbb:
        sabun = bbb

    if i+b == len(new_list):
        break
    
print(sabun)
h, w = map(int, input().split())
a = [''] * h

for i in range(w):
    a[i] = input()
    
row = [False] * h
cal = [False] * w

for i in range(h):
    for j in range(w):
        if a[i][j] == '#':
            row[i] = True
            cal[j] = True
            
for i in range(h):
    if row[i]:
        for j in range(w):
            if cal[j]:
                print(a[i][j], end='')
        print()

### FIXED CODE ###

h, w = map(int, input().split())
a = [''] * h

for i in range(h):
    a[i] = input()
    
row = [False] * h
cal = [False] * w

for i in range(h):
    for j in range(w):
        if a[i][j] == '#':
            row[i] = True
            cal[j] = True
            
for i in range(h):
    if row[i]:
        for j in range(w):
            if cal[j]:
                print(a[i][j], end='')
        print()
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from collections import Counter,defaultdict,deque
# from itertools import permutations, combinations
# from heapq import heappop, heappush
# # input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
# mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

n,k = inpm()
A = sorted(inpl())

#nCr
def comb(n,r):
    x = 1
    y = 1
    for i in range(r):
        x = x*(n-i)%mod #コンビネーションの分子
        y = y*(i+1)%mod #コンビネーションの分母
    return (x * pow(y, mod-2, mod) % mod)

ncr = [0]*(n+1)
for i in range(1,n+1):
    ncr[i] = comb(n-i,k-1)

ans = 0
for i in range(n):
    ans += (A[n-1-i] * ncr[i+1] - A[i] * ncr[i+1])
    ans %= mod

print(ans)


### FIXED CODE ###

import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from collections import Counter,defaultdict,deque
# from itertools import permutations, combinations
# from heapq import heappop, heappush
# # input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

n,k = inpm()
A = sorted(inpl())

f=[1]
for i in range(1,n+1):
  f.append(f[-1]*i % mod)

#nCr
def comb(n,r):
    if n <= 0 or r <= 0:
        return 0
    x = f[n] % mod
    y = f[r] * f[n-r] % mod
    return (x * pow(y, mod-2, mod) % mod)

ans = 0
for i in range(n):
    c = comb(n-i-1,k-1)
    ans += A[n-1-i] * c - A[i] * c
    ans %= mod
    if c == 1:
        break

print(ans)
import math
a = int(input())
b = int(input())
h = int(input())
m = int(input())
ans = math.sqrt(float(a)^2+float(b)^2+2*a*b*math.cos((h/12 + m/720 - m/60)*math.pi))
print(ans)

### FIXED CODE ###

import math
a,b,h,m = map(int, input().split())
ans = math.sqrt(float(a)**2+float(b)**2-2*a*b*math.cos((h/12 + m/720 - m/60)*math.pi*2))
print(ans)
def gcd(x,y):
    if x>=y:
        if x%y==0:
            return y
        else:
            return gcd(y,x%y)
    else:
        if y%x==0:
            return x
        else:
            return gcd(x,y%x)
def gcd2(x3):
    if len(x3)>2:
        return gcd2([gcd(x3[0],x3[1]),]+x3[2:])
    elif len(x3) ==2:
        return gcd(x3[0],x3[1])
    else:
        return x3[0]
N, X = map(int,input().split())
x=[int(i) for i in input().split()]
x.append(X)
x2=sorted(x)
x3=[]
for i in range(len(x2)-1):
    x3.append(x2[i+1]-x2[i])
print(gcd2(x3))


### FIXED CODE ###

def gcd3(x,y):
    if x>=y:
        if x%y==0:
            return y
        else:
            return gcd3(y,x%y)
    else:
        if y%x==0:
            return x
        else:
            return gcd3(x,y%x)
def gcd2(x4):
    if len(x4)>2:
        return gcd3(gcd2(x4[:len(x4)//2]),gcd2(x4[len(x4)//2:]))
    elif len(x4) ==2:
        return gcd3(x4[0],x4[1])
    else:
        return x4[0]
N, X = map(int,input().split())
x=[int(i) for i in input().split()]
x.append(X)
x3=[]
for i in range(len(x)-1):
    x3.append(abs(x[i+1]-x[i]))
print(gcd2(x3))
N = input()
s, t = [0]*N, [0]*N
for i in range(N):
  s[i], t[i] = map(int, input().split())
X = input()

ans = 0
flag = False
for i in range(N):
  if flag:
    ans += t[i]
  if s[i] == X:
    flag = True

print(ans)

### FIXED CODE ###

N = int(input())
s, t = [0]*N, [0]*N
for i in range(N):
  s[i], t[i] = input().split()
X = input()

ans = 0
flag = False
for i in range(N):
  if flag:
    ans += int(t[i])
  if s[i] == X:
    flag = True

print(ans)
A=int(input())
cnt=0
sum=0

for i in range(1,A+1):
  sum;=1
  if i%2==1:
    cnt+=1
    
print(cnt/sum)

### FIXED CODE ###

A=int(input())
cnt=0
sum=0

for i in range(1,A+1):
  sum+=1
  if i%2==1:
    cnt+=1
    
print(cnt/sum)
N= int(input())
h= list(map(int, input().split()))

dp=[N+1]

dp[0]= 0
dp[1]= h[0]

for i in range(1, N+1):
    dp[i]= min( (dp[n-1]+ abs(h[n]-h[n-1]) , dp[n-2]+ abs(h[n]-h[n-2])))

print(dp[N])


### FIXED CODE ###

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

dp=[0]*(N+1)

dp[0]= 0
dp[1]= abs(h[1]-h[0])

for i in range(2, N):
    # print((dp[i-1]+ abs(h[i]-h[i-1])))
    # print((dp[i-2]+ abs(h[i]-h[i-2])))
    # print()
    dp[i]= min( (dp[i-1]+ abs(h[i]-h[i-1])) , (dp[i-2]+ abs(h[i]-h[i-2])))
    # print(dp[i])

# print(dp)
print(dp[N-1])
h,w = map(int,input().split())

a = []
for _ in range(h):
    wk = input()

    if '#' in wk:
        a.append(wk)

t = []
for j in zip(*a):
    if '#' in j:
        t.append(j)

for list in zip(*t):
    print("".join(list))

### FIXED CODE ###

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

print(n - i + 1)
r, d, x = map(int, input().split())

for i range (10):
    ans = x * r - d
    print(ans)
    x = ans

### FIXED CODE ###

age, price = map(int, input().split())
ans = 0

if age <= 5:
    ans = 0
elif age >= 6 and age <= 12:
    ans = price // 2
else:
    ans = price 

print(ans)
from collections import Counter
from scipy.special import comb
import numpy as np
N = int(input())
A = list(map(int, input().split()))

total = 0
answers = np.array([0] * (N + 1))
for number, appearance in Counter(A).items():
    flat = comb(appearance, 2, exact=True)
    minus_one = comb(appearance - 1, 2, exact=True)
    total += flat
    answers[number] = minus_one - flat
answers += total

print(*answers[A], sep="\n")


### FIXED CODE ###

from collections import Counter
from scipy.misc import comb
import numpy as np
N = int(input())
A = list(map(int, input().split()))

total = 0
answers = np.array([0] * (N + 1))
for number, appearance in Counter(A).items():
    flat = comb(appearance, 2, exact=True)
    minus_one = comb(appearance - 1, 2, exact=True)
    total += flat
    answers[number] = minus_one - flat
answers += total

print(*answers[A], sep="\n")
import sys
N, Q = [int(i) for i in input().split()]
tree = [[] for i in range(N)]
cost_ls = [0 for i in range(N)]
for i in range(N-1):
    a, b = [int(j) for j in sys.stdin.readline().split()]
    a -= 1
    b -= 1
    tree[a].append(b)
    tree[b].append(a)

yet = set()
def plus(node, num):
    yet.add(node)
    cost_ls[node] += num
    if len(tree[node]) > 0:
        for child in tree[node]:
            if child in yet:
                continue
            plus(child, cost_ls[node])

for i in range(Q):
    p, x = [int(j) for j in sys.stdin.readline().split()]
    cost_ls[p-1] += x

plus(0, 0)

print(" ".join([str(cost) for cost in cost_ls]))

### FIXED CODE ###

import sys

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

N, Q = map(int, input().split())
V = {i: [] for i in range(1, N + 1)}
for _ in range(N - 1):
    a, b = map(int, input().split())
    V[a].append(b)
    V[b].append(a)

C = {i: 0 for i in range(1, N + 1)}

for _ in range(Q):
    p, x = map(int, input().split())
    C[p] += x


def propagate(u, p):
    for v in V[u]:
        if v == p:
            continue
        C[v] += C[u]
        propagate(v, u)


propagate(1, 0)

print(' '.join(str(C[i]) for i in range(1, N + 1)))
H, W = map(int, input().split())
s = [list(input()) for _ in range(H)]

s.insert(0, ['.']*W)
s.append(['.']*W)
for i in range(W+2):
    s[i].insert(0, '.')
    s[i].append('.')
#print(s)

flag = False
for i in range(1, H+1):
    for j in range(1, W+1):
        if s[i][j] == '#':
            if s[i][j-1] == s[i][j+1] == s[i-1][j] == s[i+1][j] == '.':
                print('No')
                flag = True
                break
    if flag:
        break
else:
    print('Yes')

### FIXED CODE ###

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

flag = False
for i in range(H):
    for j in range(W):
        if s[i][j] == '#':
            if (j-1 >= 0 and s[i][j-1] == '.') and (j+1 < W and s[i][j+1] == '.') and (i-1 >= 0 and s[i-1][j] == '.') and (i+1 < H and s[i+1][j] == '.'):
                print('No')
                flag = True
                break
    if flag:
        break
else:
    print('Yes')
n = int(input())
li = []
li.append(0)
count = 0
f = 1
for i in range(n):
    a = input()
    li.append("".join(sorted(a)))
li.sort()
for i in range(n-1):
    if li[0] == li[1]:
        f += 1
        del li[0]
    else:
        count += (f*(f-1))//2
        f = 1
        del li[0]
print(count)

### FIXED CODE ###

n = int(input())
li = []
count = 0
f = 1
for i in range(n):
    a = input()
    li.append("".join(sorted(a)))
li.sort()
for i in range(n-1):
    if li[i] == li[i+1]:
        f += 1
    else:
        count += (f*(f-1))//2
        f = 1
count += (f*(f-1))//2
print(count)
def smaller(int x, int y):
	if x < y: return x
	else: return y

inpt = map(int, raw_input())
n = inpt[0]
a = inpt[1]
b = inpt[2]

print smaller(n*a, b)

### FIXED CODE ###

def smaller(x, y):
	if x < y: return x
	else: return y

N, A, B = map(int, raw_input().split())
print smaller(A*N, B)
import math
n=int(input())
a=[int(x) for x in input().split()]
a_log=[]
for i in a:
  i_log=math.log10(i)
  a_log.append(i_log)
  
if sum(a_log)>18:
  print("-1")
else:
  for i in range(n-1):
  	a[i+1]*=a[i]
  print(a[n-1])

### FIXED CODE ###

import math
n=int(input())
a=[int(x) for x in input().split()]
a_log=[]
if 0 not in a:
  for i in a:
    i_log=math.log10(i)
    a_log.append(i_log)
  
  if sum(a_log)>18:
    print("-1")
  else:
    for i in range(n-1):
  	  a[i+1]*=a[i]
    if a[n-1]>10**18:
      print("-1")
    else:
      print(a[n-1])
else:
  print("0")
n,m,q = map(int,input().split())
num_lst = []
for i in range(q):
    num_lst.append(list(map(int,input().split())))
l = list(range(1,m+1))
A = list(combinations_with_replacement(l,n))

mx = 0
for now_A in A:
    score = 0
    for nums in num_lst:
        a,b,c,d = nums
        if now_A[b-1] - now_A[a-1] == c:
            score += d
    mx = max(mx,score)
print(mx)





### FIXED CODE ###

from itertools import combinations_with_replacement


def main():
    n,m,q = map(int,input().split())
    num_lst = []
    for i in range(q):
        num_lst.append(list(map(int,input().split())))
    l = list(range(1,m+1))
    A = list(combinations_with_replacement(l,n))

    mx = 0
    for now_A in A:
        score = 0
        for nums in num_lst:
            a,b,c,d = nums
            if now_A[b-1] - now_A[a-1] == c:
                score += d
        mx = max(mx,score)
    print(mx)



if __name__ == '__main__':
    main()
def search(x, num):
    nodes.remove(x)
    search_list = []
    for y in list(edge[x]):
        edge[y].remove(x)
        if y in nodes:
            num = search(y, num)
    return num + 1


(n,m),*d  = [list(map(int, s.split())) for s in open(0)]

edge = [set() for _ in range(n+1)]
for x in d:
    edge[x[0]].add(x[1])
    edge[x[1]].add(x[0])

nodes = set(range(1,n+1))
ans = 1
for x in list(nodes):
    if x not in nodes:
        continue
    tmp = search(x, 0)
    ans = max(tmp, ans)
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(int(1e6))

def search(x, num):
    nodes.remove(x)
#     for y in edge[x]:
#         edge[y].discard(x)
#     for y in list(edge[x]):
    for y in edge[x]:
        if y in nodes:
            num = search(y, num)
    return num + 1

(n,m),*d  = [list(map(int, s.split())) for s in open(0)]

edge = [set() for _ in range(n+1)]
for x in d:
    edge[x[0]].add(x[1])
    edge[x[1]].add(x[0])

nodes = set(range(1,n+1))
ans = 1
for x in list(nodes):
    if x in nodes:
        ans = max(ans, search(x, 0))
print(ans)
N, Q = map(int, input().split())
lst = []
cnt = []
ans = [0]*N
for i in range(N-1):
    lst.append(sorted(list(map(int, input().split()))))
lst = sorted(lst)
print(lst)
for j in range(Q):
    cnt.append(list(map(int, input().split())))
               
for k in cnt:
    ans[k[0]-1] += k[1]
for i in lst:
    ans[i[1]-1] += ans[i[0]-1]
for a in ans:
    print(a, end=" ")

### FIXED CODE ###

a = int(input())
s = str(input())

if a >= 3200:
  print(s)
else:
  print('red')
N = int(input())
l = [i for i in range(1, int(input()) + 1) if i % 3 != 0 and i % 5 != 0]
s = sum(l)
print(s)

### FIXED CODE ###

N = int(input())
sum=0
for i in range(1, N+1):
    if i%3!=0 and i%5!=0:
        sum += i
print(sum)
n,m=map(int,input().split())
l=[set() for _ in range(n+1)]*(n+1)
mn=0
for i in range(m):
  a,b=map(int,input().split())
  l[a].add(b)
  l[b].add(a)

for i in range(n):
  aa=l[i]
  for k in l[i]:
    aa=aa|l[k]
  mn=max(mn,len(aa))
print(mn)
  

### FIXED CODE ###

n,m=map(int,input().split())
l=[set() for _ in range(n+1)]

for i in range(m):
  a,b=map(int,input().split())
  l[a].add(b)
  l[b].add(a)

from collections import deque

vi=[0 for _ in range(n+1)]
st=deque([i,i] for i in range(1,n+1))

while st:
  c,d=st.popleft()

  if vi[c]==0 :
    vi[c]=d
    for m in l[c]:
      st.appendleft([m,d])
from collections import Counter
s=Counter(vi)
mx=0
for m in s.values():
  mx=max(mx,m)
print(mx)
import math
a,b=[int(i) for i in input().split()]
def lcm1(x, y):
    return (x * y) // math.gcd(x, y)

  
  
m=lcm1(a,b) 
print(m)

### FIXED CODE ###

A, B=[int(i) for i in input().split()]

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
def lcm(a, b):
	return a * b // gcd (a, b)
  
print(lcm(A,B))
count = 0
a, b, c = map(int, input().split())
for i in range(a,b)
    if c % i ==0:
        count += 1
print(f'{count}')



### FIXED CODE ###

count = 0
a, b, c = map(int, input().split())
for i in range(a,b+1):
    if c % i == 0:
        count += 1
print(f'{count}')
N = int(input())
L = list(map(int, input().split()))
ans = 0
#for i in range(N):
#  for j in range(i + 1, N):
#    for k in range(j + 1, N):
#      #print(str(i) + str(j) + str(k))
#      if L[i] < L[j] + L[k] and L[j] < L[k] + L[i] and L[k] < L[i] + L[j]:
#        ans += 1
#print(ans)
comb = list(itertools.combinations(L, 3))
print(comb)



### FIXED CODE ###

import bisect
N = int(input())
#ソートしておく
L = sorted(list(map(int, input().split())))
ans = 0

#短い2辺を総当たりで選択
for i in range(N - 2):
  for j in range(i + 1, N - 1):
    #小さい順に並べた時の成立条件
    # l1 + l2 > l3
    l12 = L[i] + L[j]
    #l2の隣から　l12以下のところまで全部が対象、成立しない場合
    #ans += max(bisect.bisect_left(L, l12) - j - 1, 0)
    ans += bisect.bisect_left(L, l12) - j - 1
print(ans)
a,b=map(int,input().split())
if(a*b)%2:
print("Odd")
else:
print("Even")


### FIXED CODE ###

a,b=map(int,input().split())
if(a*b)%2:
   print("Odd")
else:
   print("Even")
x,a,b=map(int,input())
n=a-b
if n >= 0:
  print("delicious")
elif x+n >=0:
  print("safe")
else:
  print("dangerous")

### FIXED CODE ###

x,a,b=map(int,input().split())
n=a-b
if n >= 0:
  print("delicious")
elif x+n >=0:
  print("safe")
else:
  print("dangerous")
A = input()
B = print(A.count('o'))
print(700+int(B)*100)

### FIXED CODE ###

A = input()
B = A.count('o')
print(700+int(B)*100)
N=int(input())

if N<2:
	print(0)

else:
	without=10*(N-2)
	considered=(without+2)*(without+1)
	consider%=10**9+7

### FIXED CODE ###

MOD=10**9+7
N=int(input())
 
all=pow(10,N,MOD)
sub9=pow(9,N,MOD)
sub8=pow(8,N,MOD)
print((all-2*sub9+sub8)%MOD)
i = int(input())
s = input()
n = i // 2
s1 = s[0:n]
s2 = s[n:i]
#print(s1)
#print(s2)

if((i % 2 == 0)and(s1 == s2)):
    print("Yes")
e6lse:
    print("No")

### FIXED CODE ###

i = int(input())
s = input()
n = i // 2
s1 = s[0:n]
s2 = s[n:i]

if((i % 2 == 0)and(s1 == s2)):
    print("Yes")
else:
    print("No")
n,m=map(int,input().split())
dp=[-1]*100100
E=[ [] for i in range(100100) ]

for i in range(m):
  x,y=map(int,input().split())
  x-=1
  y-=1
  E[x].append(y)

def rec(v):
  if dp[v]!=-1:return dp[v]
  res=0
  for nv in E[v]:
    res=max(res,rec(nv)+1)
  dp[v]=res
  return res

res=0
for v in range(n):
  res=max(res,rec(v))
print(res)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)
#print(sys.getrecursionlimit())
n,m=map(int,input().split())
dp=[-1]*n
E=[ [] for i in range(n) ]

for i in range(m):
  x,y=map(int,input().split())
  x-=1
  y-=1
  E[x].append(y)

def rec(v):
  if dp[v]!=-1:return dp[v]
  res=0
  for nv in E[v]:
    res=max(res,rec(nv)+1)
  dp[v]=res
  return res

res=0
for v in range(n):
  res=max(res,rec(v))
print(res)