Harryxun/stf_run huggingface dataset:
N, M = map(int, input().split())
A = [0] * M
B = [0] * M
for i in range(M):
    A[i], B[i] = map(int, input().split())

class UnionFind:
    def __init__(self, n):
        # 親要素のノード番号を格納。par[x] == xの時そのノードは根
        self.par = [-1 for i in range(n + 1)]
        # 木の高さを格納する（初期状態では0）
        """self.rank = [0] * (n + 1)"""

    # 検索
    # 根ならその番号を返す
    def find(self, x):
        if self.par[x] < 0:
            return x
        else:
            # 走査していく過程で親を書き換える
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    # 併合
    def union(self, x, y):
        # 根を探す
        x = self.find(x)
        y = self.find(y)
        # 木の高さを比較し、低いほうから高いほうに辺を張る
        if x != y:
            if self.par[x] < self.par[y]:  # par<0の小さい方に合わせる
                self.par[y] += self.par[x]
                self.par[x] = y
            else:
                self.par[x] += self.par[y]
                self.par[y] = x
                # 木の高さが同じなら片方を1増やす
                """if self.rank[x] == self.rank[y]:
                    self.rank[x] += 1"""

    def size(self, x):
        return -self.par[self.find(x)]
    
    
u = UnionFind(N)
for i in range(M):
    u.union(A[i], B[i])
    
ans = 1
for i in range(1, N+1):
    print("{}の属するグループは{}人です。".format(i, u.size(i)))
    ans = max(ans, u.size(i))
print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
A = [0] * M
B = [0] * M
for i in range(M):
    A[i], B[i] = map(int, input().split())

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * (n+1)

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]
    
u = UnionFind(N)
for i in range(M):
    u.union(A[i], B[i])
    
ans = 1
for i in range(1, N+1):
    ans = max(ans, u.size(i))
print(ans)
numbers = input().split(" ")
a = numbers[0]
b = numbers[1]
c = a*b
if c%2==0:
  print("Even")
elif c%2==1:
  print("Odd")

### FIXED CODE ###

numbers = input().split(" ")
a= int(numbers[0])
b= int(numbers[1])
c=a*b
if c%2==0:
  print("Even")
else:
  print("Odd")
S = int(input())
h = int(S / 3600)
m = int(S / 60)
m = m % 60
s = m % 60
print({0}:{1}:{2}.format(h,m,s)}

### FIXED CODE ###

S = int(input())
h = int(S / 3600)
m = int(S / 60)
m = m % 60
s = S % 60
print("{0}:{1}:{2}".format(h,m,s))
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

count = 0
while True:
    if A[0]-B[0] >= 0:
        K = K-B[0]
        if K >= 0 :
            count += 1
            B.pop(0)
        else:
            break

    else:
        K = K-A[0]
        if K >= 0 :
            count += 1
            A.pop(0)
        else:
            break        
print(count)

### FIXED CODE ###


import numpy as np
a,b,k=map(int,input().split())
n=list(map(int,input().split()))
m=list(map(int,input().split()))
n.insert(0,0)
m.insert(0,0)
n=np.array(n)
m=np.array(m)
n=n.cumsum()
m=m.cumsum()
ans=0
j=len(m)-1
for i in range(len(n)):
    if n[i]>k:
        break
    while m[j]>k-n[i]:
        j-=1
    ans=max(ans,i+j)
print(ans)
N=int(input())
S=input()
 
print(S.count('ABC'))

### FIXED CODE ###

K,X=map(int, input().split())
if K*500>=X:
    print('Yes')
else:
    print('No')
n, m = map(int, input().split())
values = list(map(int, input().split()))

count_table = [None, 2,5,5,4,5,6,3,7,6]

dp = [{} for _ in range(n + 1)]
dp[0] = {0: 0}

for i in range(m):
    my_value = values[i]
    for j in range(n):
        dic = dp[j]
        if len(dic) > 0:
            my_count = 1
            while j + count_table[my_value] * my_count <= n:
                already = dp[j + count_table[my_value] * my_count]
                new_dic = {my_value: my_count, **dic}




                s = ''
                for value, cnt in reversed(sorted(already.items())):
                    s += str(value) * cnt
                s_already = s
                s = ''
                for value, cnt in reversed(sorted(new_dic.items())):
                    s += str(value) * cnt

                if s_already == '':
                    dp[j + count_table[my_value] * my_count] = new_dic
                elif s == '':
                    pass
                elif int(s_already) < int(s):
                    dp[j + count_table[my_value] * my_count] = new_dic



                my_count += 1

pin_dic = dp[n]

s = ''
for value, cnt in reversed(sorted(pin_dic.items())):
    s += str(value) * cnt
print(s)


### FIXED CODE ###

n, m = map(int, input().split())
aa = reversed(sorted(map(int, input().split())))

t = ['_', 2, 5, 5, 4, 5, 6, 3, 7, 6]

# n 本使ってできる最大の桁数
dp = [-1 for _ in range(n + 1)]
dp[0] = 0

for a in aa:
    for i in range(len(dp)):
        if dp[i] >= 0 and i + t[a] < len(dp):
            dp[i + t[a]] = max(dp[i + t[a]], dp[i] * 10 + a)

print(dp[n])
n.m = input().split()
r,b = map(int,input().split())
t = input()
if n == t:
  print(str(r-1) + ' ' + str(b))
else:
  print(str(r) + ' ' + str(b-1))


### FIXED CODE ###

n,m = input().split()
r,b = map(int,input().split())
t = input()
if n == t:
  print(str(r-1) + ' ' + str(b))
else:
  print(str(r) + ' ' + str(b-1))
route.append(route1) 
                    count += 1
                    block = (H - 1) + (W - 1)
                    print(route1)
                    for q in range(0, len(route1)):
                        if q+1 != len(route1):
                            if s[route1[q+1]] == s[route1[q]] and ((route1[q+1] == route1[q] + 1) or (route1[q] % W == (route1[q] + 1) % W)):
                                block = block - 1
                    best = min([best, block])

### FIXED CODE ###

import numpy as np

H, W = map(int, input().split())
temp = [list(input().replace("#","0").replace(".","1")) for i in range(H)]
masu = [[int(temp[i][j]) for j in range(W)] for i in range(H)]

dp = np.zeros((H, W))
if masu[0][0] == 0:
    dp[0][0] = 1

for i in range(0,H):
    for j in range(0,W):
        if i == 0:
            a = 100000
        else:
            if masu[i][j] == 0 and masu[i-1][j] == 1:
                a = dp[i-1][j] + 1
            else:
                a = dp[i-1][j]
        if j == 0:
            b = 100000
        else:
            if masu[i][j] == 0 and masu[i][j-1] == 1:
                b = dp[i][j-1] + 1
            else:
                b = dp[i][j-1]
        if a != 100000 or b != 100000:
            dp[i][j] = min([a, b])
print(int(dp[H-1][W-1]))
# coding: utf-8
num, size = map(int,input().split())
data =[]
for x in range(num):
    data.append(input())
print(str.join(data.sort()))

### FIXED CODE ###

# coding: utf-8

data = list(map(int,input().split()))
if 2 == data.count(5) and 1 == data.count(7):
    print("YES")
else:
    print("NO")
n = int(input())
a = list(map(int, input().split()))
dic = {}
for i in range(n-1):
  idx = i + a[i] + 1
  if idx in dic:
    dic[idx] += 1
  else:
    dic[idx] = 1
ans = 0
j = n-1
while j > 0:
  target = j + 1 - a[j]
  idx = j + 1 + a[j]
  if target in dic:
    ans += dic[target]
  dic[idx] -= 1
  j -= 1
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
dic = {}
for i in range(n-1):
  idx = i + a[i] + 1
  if idx in dic:
    dic[idx] += 1
  else:
    dic[idx] = 1
ans = 0
j = n-1
while j > 0:
  target = j + 1 - a[j]
  idx = j + 1 + a[j]
  if target in dic:
    ans += dic[target]
  if j < n-1:
  	dic[idx] -= 1
  j -= 1
print(ans)
n,a,b = map(int,input().split())
lim = 10**9+7
class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  # 10
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        # 階乗のリストと階乗のmod逆元のリストを返す O(n)
        # self.make_modinv_list()が先に実行されている必要がある
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        # 0からnまでのmod逆元のリストを返す O(n)
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv
combination = Combination(n)
print((pow(2,n,lim)-combination(n,a)-combination(n,b)-1) % lim)


### FIXED CODE ###

n,a,b = map(int,input().split())
lim = 10**9+7
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)
def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

print((pow(2,n,lim)-combination(n,a)-combination(n,b)-1) % lim)
#!/usr/bin/env python3
import numpy as np
from decimal import Decimal
n = int(input()) 
A = list(map(Decimal, input().split()))
i = 10 ** 18
ans = int(np.prod(A))
if ans > i:
    print(-1)
else:
    print(ans)

### FIXED CODE ###

#!/usr/bin/env python3
n = int(input()) 
A = list(map(int, input().split()))
b = 1
i = 10**18
A = sorted(A)
for a in A:
  if b > i:
    break
  b *= a
print(-1 if b > i else b)
s = input()
for i in range(len(s)):
  s[i]='x'
print(s)

### FIXED CODE ###

s = input()
for i in range(len(s)):
  print('x',sep='',end='')
from itertools import accumulate
from bisect import bisect

N = int(input())
C = [0]+list(accumulate(map(int,input().split())))

def solve(x):
  def h(i,j):
    m = (C[j]+C[i])//2
    k = bisect(C, m, lo=i+1,hi=j)

    _,a,b = min((abs(m-C[x]),C[x]-C[i],C[j]-C[x]) for x in (k-1,k))
    return a,b

  L = h(0,x)+h(x,N)
  return max(L)-min(L)

print(min(solve(i) for i in range(2,N-2)))

### FIXED CODE ###

from itertools import accumulate
from bisect import bisect

N = int(input())
C = [0]+list(accumulate(map(int,input().split())))

def h(i,j):
  ci,cj = C[i],C[j]
  k = bisect(C, (ci+cj)//2, lo=i+1,hi=j)
  _,a,b = min((abs(ci+cj-2*c),cj-c,c-ci) for c in (C[k-1],C[k]))
  return a,b

def solve(x):
  L = h(0,x)+h(x,N)
  return max(L)-min(L)

print(min(solve(i) for i in range(2,N-1)))
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve2():
    n, m = map(int, input().split())

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

    depth = [0 for _ in range(n)]

    def dfs(v, p, d):
        depth[v] = d
        for u in edge[v]:
            if u == p:
                continue
            dfs(u, v, d + 1)

    dfs(0, -1, 0)
    if depth[n - 1] <= 2:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")


if __name__ == '__main__':
    resolve2()

### FIXED CODE ###

from collections import deque

n, m = map(int, input().split())
tree = [[] for _ in range(n)]
for _ in range(m):
    a, b = map(int, input().split())
    tree[a - 1].append(b - 1)
    tree[b - 1].append(a - 1)
res = []

f_inf = float("inf")
dist = [f_inf for _ in range(n)]
dist[0] = 0
q = deque()
q.append(0)
while q:
    u = q.popleft()
    for nv in tree[u]:
        if dist[nv] == f_inf:
            dist[nv] = dist[u] + 1
            q.append(nv)
if dist[n - 1] <= 2:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
function sort(S,T){
  var str1=S;
  
  var str2 =T;
  var res=(str1.split("")).concat(str2.split(""));
  return res;
}

### FIXED CODE ###

S,T=input().split()
print(T+S)
def sub(N, M, As):

    d_cost = {
            "1": 2,
            "2": 5,
            "3": 5,
            "4": 4,
            "5": 5,
            "6": 6,
            "7": 3,
            "8": 7,
            "9": 6,
            }
    
    NINF = -10**6
    dp_table = [NINF for _ in range(N+1)]
    dp_table[0] = 0
    for i in range(N):
        for a in As:
            cost = i + d_cost[a]
            if cost <= N:
                dp_table[cost] = max(dp_table[cost], dp_table[i] + 1)

    Lmax = dp_table[N]

    life = N
    buf = []
    for i in range(Lmax):
        oks = [a for a in As if dp_table[life - d_cost[a]] == dp_table[life] - 1 and life - d_cost[a] >= 0]
        a_selected = max(oks)
        buf.append(a_selected)
        life = life - d_cost[a_selected]
    print("".join(buf))
            

if __name__ == "__main__":
    N, M = [int(e) for e in input().split()]
    As = [e for e in input().split()]
    sub(N, M, As)
    





### FIXED CODE ###

def sub(N, M, As):

    d_cost = {
            "1": 2,
            "2": 5,
            "3": 5,
            "4": 4,
            "5": 5,
            "6": 6,
            "7": 3,
            "8": 7,
            "9": 6,
            }
    
    NINF = -10**6
    dp_table = [NINF for _ in range(N+1)]
    dp_table[0] = 0
    for i in range(N):
        if dp_table[i] < 0:
            continue
        for a in As:
            cost = i + d_cost[a]
            if cost <= N:
                dp_table[cost] = max(dp_table[cost], dp_table[i] + 1)

    Lmax = dp_table[N]

    life = N
    buf = []
    for i in range(Lmax):
        oks = []
        for a in As:
            if life - d_cost[a] < 0:
                continue
            if dp_table[life - d_cost[a]] == dp_table[life] - 1:
                oks.append(a)
        # oks = [a for a in As if dp_table[life - d_cost[a]] == dp_table[life] - 1 and life - d_cost[a] >= 0]
        a_selected = max(oks)
        buf.append(a_selected)
        life = life - d_cost[a_selected]
    print("".join(buf))
            

if __name__ == "__main__":
    N, M = [int(e) for e in input().split()]
    As = [e for e in input().split()]
    sub(N, M, As)
n = int(input())
a = [[] for i in range(n)]
for i in range(n):
    x,y = map(int,input().split())
    a[x-1].append(y-1)
    a[y-1].append(x-1)

def dfs(v):
    d = [-1 for i in range(n)]
    q = []
    d[v] = 0
    q.append(v)
    while len(q):
        v = q.pop()
        for i in a[v]:
            if d[i] == -1:
                d[i] = d[v]+1
                q.append(i)
    return d
c1 = dfs(0)
c2 = dfs(n-1)
c = 0
for i in range(n):
    if c1[i]>c2[i]:
        c += 1
if c>= n/2:
    print("Snuke")
else:
    print("Fennec")


### FIXED CODE ###

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

def dfs(v):
    d = [-1 for i in range(n)]
    q = []
    d[v] = 0
    q.append(v)
    while len(q):
        v = q.pop()
        for i in a[v]:
            if d[i] == -1:
                d[i] = d[v]+1
                q.append(i)
    return d
c1 = dfs(0)
c2 = dfs(n-1)
c = 0
for i in range(n):
    if c1[i]>c2[i]:
        c += 1
if c>= n/2:
    print("Snuke")
else:
    print("Fennec")
inputs=lambda:map(int,raw_input().split())
n, m = inputs()
es = [inputs() for i in xrange(m)]
es.sort(key=lambda x:x[2])
parent = range(n+1)
def root(x):
    if x == parent[x]:
        return x
    parent[x] = root(parent[x])
    return parent[x]
def unite(x, y):
    px = root(x)
    py = root(y)
    if px < py:
        parent[py] = px
    else:
        parent[px] = py
su = 0
g = [[] for i in xrange(n+1)]
for c, a, b in es:
    if root(a) != root(b):
        unite(a, b)
        su += c
        g[a].append((b, c))
        g[b].append((a, c))

import sys
sys.setrecursionlimit(100000)
dic = {}
def dfs(s, v, prev, cost):
    dic[s,v] = cost
    for e, c in g[v]:
        if prev != e:
            dfs(s, e, v, max(cost, c))
for i in xrange(n):
    dfs(i+1, i+1, -1, 0)
for i in xrange(input()):
    s, t = inputs()
    print su-dic[s,t]


### FIXED CODE ###

from collections import deque
import sys
sys.setrecursionlimit(10**5)

N, M = map(int, input().split())
E = []
for i in range(M):
    a, b, c = map(int, input().split())
    E.append((c, a-1, b-1))
E.sort()

*p, = range(N)
def root(x):
    if x == p[x]:
        return x
    p[x] = y = root(p[x])
    return y

L = 2*N-1
G = [[]] * L
C = [0]*L
*lb, = range(N)
cur = N

s = 0
for c, a, b in E:
    pa = root(a); pb = root(b)
    if pa == pb:
        continue
    s += c
    chds = [lb[pa], lb[pb]]
    if pa < pb:
        p[pb] = pa
        lb[pa] = cur
    else:
        p[pa] = pb
        lb[pb] = cur
    C[cur] = c
    G[cur] = chds
    cur += 1

H = [0]*L
prv = [-1]*L
def dfs(v):
    s = 1; heavy = -1; m = 0
    for w in G[v]:
        prv[w] = v
        c = dfs(w)
        if m < c:
            heavy = w
            m = c
        s += c
    H[v] = heavy
    return s
dfs(L-1)

SS = []
D = []
LB = [0]*L
I = [0]*L
que = deque([(L-1, 0)])
while que:
    v, d = que.popleft()
    S = []
    k = len(SS)
    while v != -1:
        I[v] = len(S)
        S.append(v)
        LB[v] = k
        h = H[v]
        for w in G[v]:
            if h == w:
                continue
            que.append((w, d+1))
        v = h
    SS.append(S)
    D.append(d)


def query(u, v):
    lu = LB[u]; lv = LB[v]
    dd = D[lv] - D[lu]
    if dd < 0:
        lu, lv = lv, lu
        v, u = u, v
        dd = -dd

    for _ in range(dd):
        v = prv[SS[lv][0]]
        lv = LB[v]

    while lu != lv:
        u = prv[SS[lu][0]]
        lu = LB[u]

        v = prv[SS[lv][0]]
        lv = LB[v]

    return u if I[u] < I[v] else v


def gen():
    Q = int(input())
    for i in range(Q):
        u, v = map(int, input().split())
        w = query(u-1, v-1)
        yield "%d\n" % (s - C[w])
ans = list(gen())
sys.stdout.writelines(ans)
a = list(sys.stdin.read().split())
t = [[int(n[:-1] or 0), int(n[-1])] for n in a]
print((sum(t[0]) + (len(u := list(filter(lambda n: n > 0, t[1]))) - 1)) * 10 + min(u))

### FIXED CODE ###

import sys
a = list(sys.stdin.read().split())
t = list(zip(*[[int(n[:-1] or 0), int(n[-1])] for n in a]))
print((sum(t[0]) + len((u := sorted(filter(lambda n: n > 0, t[1])))[:0:-1])) * 10 + (u and u[0] or 0))
import re
S = input()
K = int(input())

next_t = S
now_t = ""

while next_t.ljust(K)[:K] != now_t.ljust(K)[:K]:
    now_t = next_t
    next_t = re.sub(r"[2]","22", next_t)
    next_t = re.sub(r"[3]","333", next_t)
    next_t = re.sub(r"[4]","4444", next_t)
    next_t = re.sub(r"[5]","55555", next_t)
    next_t = re.sub(r"[6]","666666", next_t)
    next_t = re.sub(r"[7]","7777777", next_t)
    next_t = re.sub(r"[8]","88888888", next_t)
    next_t = re.sub(r"[9]","999999999", next_t)

print(next_t[K])
    

### FIXED CODE ###

S = input()
K = int(input())
ret = "1"
for i in range(K):
    if len(S) < i-1:
        break
    if S[i] != "1":
        ret = S[i]
        break
print(ret)
a,b = input()
if a == b :
  print('H')
else:
  print('D')

### FIXED CODE ###

a,b = input().split()
if a == b :
  print("H")
else:
  print("D")
s, t = input().split()
n1, n2 = int(input()).split()
i = input()
if(i==s):
  return n1=n1-1
elif(i==t)
  return n2=n2-1
print(n1,n2)

### FIXED CODE ###

S, T = input().split()
A ,B = input().split()
U = str(input())
if(U == S):
   A = int(A) - 1
elif(U==T):
    B = int(B) -1
print(A,B)
age = map(int,input())
fee = map(int,input())

if age >= 13:
	print(fee)
    
elif 6 <= age <= 12:
	print(fee // 2)

else:
	print(0)

### FIXED CODE ###

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

if A >= 13:
	print(B)
    
elif 6 <= A <= 12:
	print(B // 2)

else:
	print(0)
import sys
input=sys.stdin.readlines
n,m=map(int,input().split())
lists=list(map(int,input().split()))
uselist=[0 for i in range(n)]
for i in range(n):
    uselist[i]=lists[i]//2
import fractions
import math
ans = uselist[0]
for i in range(1, n):
    ans = ans* uselist[i]//fractions.gcd(ans, uselist[i])
flags=True
for some in uselist:
    a=ans//some
    if a%2==0:
        flags=False
        break
if flags:
    p=math.floor(m/ans)
    if p%2==0:
        print(p//2)
    elif p%2!=0:
        print(p//2+1)    
else:
    print(0)

### FIXED CODE ###

n,m=map(int,input().split())
lists=list(map(int,input().split()))
uselist=[]
for some in lists:
    some=some//2
    uselist.append(some)

import fractions
import math
ans = uselist[0]
for i in range(1, n):
    ans = ans* uselist[i] // fractions.gcd(ans, uselist[i])

flags=True
for some in uselist:
    a=ans//some
    if a%2==0:
        flags=False
        break
if flags:
    p=math.floor(m/ans)
    if p%2==0:
      print(p//2)
    elif p%2!=0:
      print(p//2+1)
    
else:
    print(0)
function Main(input) {
	var str = input;
	var ans = "YES";
	str = str.split("\n");
	var l = str[1].split(" "); 
	loop:
	for(var j =0;j< l.length-1;j++){	
 		for(var i =1; i<l.length;i++){
 			 if(l[j]===l[i]){
	 			ans = "NO";
	 			break loop;
 			}	 	
 		}
	} 	
	console.log(ans);
}
 //*おまじない
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
a.sort()
for i in range(len(a)-1):
    if a[i] == a[i+1]:
        print('NO')
        exit()
print('YES')
import math
n,k=map(int,input().split()) 
lst=list()

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

for i in range(1, k+1):
    if i > N - K + 1:
        lst.append(int(0))
    else:
        lst.append(comb(n-k+1, i) * comb(k-i+(i-1), i-1))  

for i in range(k):
    print(lst[i]%(10**9+7))

### FIXED CODE ###

import math
n,k=map(int,input().split()) 

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

mod_num = 10 ** 9 + 7
for i in range(1, k+1):
    if i > n - k + 1:
        print(0)
    else:
        print(comb(n-k+1, i) * comb(k-i+(i-1), i-1) % mod_num)
import math
 
a,b,c = map(int,input().split())
 
if( a*a + b*b + c*c > 2*(a*b + a*c + b*c) && c-(a+b) > 0 ):
  print('Yes')
else:
  print('No')

### FIXED CODE ###

import math
 
a,b,c = map(int,input().split())
 
if( a*a + b*b + c*c > 2*(a*b + a*c + b*c) and c-(a+b) > 0 ):
  print('Yes')
else:
  print('No')
N, M = map(int, input().split())
a = [0]*M
for i in range(M):
    s, c = map(int, input().split())
    a[s-1] = c
if a[0] == 0:
    print("-1")
else:
    print(*a, sep="")    

### FIXED CODE ###

N, M = map(int, input().split())
A=[]
for j in range(M):
    s, c = map(int, input().split())
    A.append([s-1, str(c)])
if N == 1:
    b = 0
elif N == 2:
    b= 10
else:
    b = 100
ans=[]
for i in range(b, 1000):
    a = 0
    for j in range(M):
        x=str(i)
        if len(x) < N:
            break 
        if A[j][1] == x[A[j][0]]:
            a += 1
    if a == M:
        ans.append(i)
if ans == []:
    print(-1)
else:
    print(min(ans))
a,b,c=map(int,input().split())
print(len(set(a,b,c)))

### FIXED CODE ###

a,b,c=map(int,input().split())
print(len(set([a,b,c])))
n,x=map(int, input().split())
l=list(map(int, input().split()))
cnt=0
for i in range(n):
  if cnt+l[i]<=x:
    cnt+=1
    cnt+=l[i]
  else:
    break
print(ans)

### FIXED CODE ###

n,x=map(int, input().split())
l=list(map(int, input().split()))
cnt=0
ans=1
for i in range(n):
  if cnt+l[i]<=x:
    ans+=1
    cnt+=l[i]
  else:
    break
print(ans)
N = input()
N = (int)N
i=0
V = []
C = []
num = 0
while i<N:
  num = input()
  num = (int)num
  V.append(num)
 
num = 0
i=0
while i<N:
  num = input()
  num = (int)num
  C.append(num)
max = 0
while i<N:
  max = max + V[i] - C[i]
  
print(max)

### FIXED CODE ###

N = 0
V = []
C = []
 
i = 0
ans = 0

str = input()
N = int(str)
 
str = input().split()
while i < N:
  V.append(int(str[i]))
  i = i+1
  
i=0
str = 0
str = input().split()
while i < N:
  C.append(int(str[i]))
  i = i+1

i=0
while i<N:
  if V[i] > C[i]:
    ans = ans + V[i] - C[i]
  i = i+1
    
    
print(ans)