Harryxun/stf_run huggingface dataset:
N = int(input().strip())

n_list = [[] for i in range(N)]
d = [0] * N

for i in range(N-1):
    a, b = map(int, input().strip().split())
    a -= 1
    b -= 1
    n_list[a].append([b,i])
    n_list[b].append([a,i])
    d[a] += 1
    d[b] += 1


#print(n_list)
#print(d)

d_dict = {}
for i in range(N):
    d_dict[i] = d[i]
tmp = sorted(d_dict.items(), key = lambda x:x[1], reverse = True)

colors = [0] * (N)

root = tmp[0][0]

def paint(node, parent_edge_id):
    #print(node, parent_edge_id)
    tmp_color = 1
    for edge in n_list[node]:
        #print("ege:", edge)
        if edge[1] != parent_edge_id:
            if parent_edge_id != -1 and tmp_color == colors[parent_edge_id]:
                tmp_color += 1
            colors[edge[1]] = tmp_color
            paint(edge[0], edge[1])
            tmp_color += 1

    
try:
    paint(tmp[0][0], -1)
except TypeError:
    print(0)
print(tmp[0][1]) # color num    a
for i in range(N-1):
    print(colors[i])

### FIXED CODE ###

import sys
N = int(input().strip())

n_list = [[] for i in range(N)]
d = [0] * N

for i in range(N-1):
    a, b = map(int, input().strip().split())
    a -= 1
    b -= 1
    n_list[a].append([b,i])
    n_list[b].append([a,i])
    d[a] += 1
    d[b] += 1


#print(n_list)
#print(d)

d_dict = {}
for i in range(N):
    d_dict[i] = d[i]
tmp = sorted(d_dict.items(), key = lambda x:x[1], reverse = True)

colors = [0] * (N)

root = tmp[0][0]

def paint(node, parent_edge_id):
    #print(node, parent_edge_id)
    tmp_color = 1
    for edge in n_list[node]:
        #print("ege:", edge)
        if edge[1] != parent_edge_id:
            if parent_edge_id != -1 and tmp_color == colors[parent_edge_id]:
                tmp_color += 1
            colors[edge[1]] = tmp_color
            paint(edge[0], edge[1])
            tmp_color += 1

    
sys.setrecursionlimit(10**7)
paint(tmp[0][0], -1)
print(tmp[0][1]) # color num 
for i in range(N-1):
    print(colors[i])
def resolve():
    '''
    code here
    '''
    N = int(input())

    ans_list = [i*(i+1)//2 for i in range(1, N+1)]
    delta = 0
    if N > 1:
        for i in range(1, N+1):
            if ans_list[i-1] < N < ans_list[i]:
                delta = ans_list[i] - N
                res_list = list(range(1, i+2))
                break
            elif N == ans_list[i]:
                res_list = range(1, i+2)
    else:
        res_list = [1]

    if delta > 0:
        while delta > res_list[-1]:
            delta -= res_list[-1]
            del res_list[-1]

        res_list.remove(delta)    
    

    for item in res_list:
        print(item)



if __name__ == "__main__":
    resolve()


### FIXED CODE ###

def resolve():
    '''
    code here
    '''
    N = int(input())

    delta = 0
    if N > 1:
        for i in range(1, N+1):
            if (i-1)*i < 2*N < i*(i+1):
                delta = i*(i+1)//2 - N
                res_list = list(range(1, i+1))
                break
            elif 2*N == i*(i+1):
                res_list = range(1, i+1)
    else:
        res_list = [1]

    if delta > 0:
        while delta > res_list[-1]:
            delta -= res_list[-1]
            del res_list[-1]

        res_list.remove(delta)    
    

    for item in res_list:
        print(item)



if __name__ == "__main__":
    resolve()
s = input()
t = input()

print(t2)
if s == t2:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

s = input()
t = input()
t2 = t[:-1]

if s == t2:
    print("Yes")
else:
    print("No")
N,A=map(int,input().split())
if N%500<=A:
print("Yes")
else: 
print("No")


### FIXED CODE ###

a = int(input())
n = int(input())
if((a%500)<=n):
  print("Yes")
else:
  print("No")
a,b,c = map(str, input().split())
d = b.split("")
e = d[0]
print("A"+e+"C")

### FIXED CODE ###

a,b,c = map(str, input().split())
d = b[0]
print("A"+d+"C")
S, T = input().split()
print([T, S].join())

### FIXED CODE ###

S, T = (input().split())
#print(S, T)
print(''.join([T, S]))
a,b,c,d=map(int,input().spplit())

index=0
for i in range(1000):
	if index==0:
		c=c-b
		if c<=0:
			print("Yes")
			break
		else:
			index=1
	else:
		a=a-d
		if a<=0:
			print("No")
			break
		else:
			index=0
			


### FIXED CODE ###

a,b,c,d=map(int,input().split())

index=0
for i in range(1000):
	if index==0:
		c=c-b
		if c<=0:
			print("Yes")
			break
		else:
			index=1
	else:
		a=a-d
		if a<=0:
			print("No")
			break
		else:
			index=0
N,M = map(int, input().split())
a = [int(input()) for i in range(M)]

flag = 0
for i in range(M-1):
    if a[i+1] - a[i] == 1:
        flag += 1

if flag >= 1:
    print(0)

else:
    def fib(n):
        a, b = 0, 1
        for i in range(n):
            a, b = b, a + b
        return b

    ans = fib(a[0]-1)
    for i in range(M-1):
        ans = (ans * fib(a[i+1]-a[i]-2))%(10**9+7)

    ans = (ans * fib(N-a[-1]-1))%(10**9+7)

    print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10000)

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

def fib(n):
        a, b = 0, 1
        for i in range(n):
            a, b = b, a + b
        return b if n >= 0 else 0

if M == 0:
    ans = fib(N) % (10**9+7)


elif M == 1:
    ans = fib(a[0]-1) * fib(N-a[0]-1)
    ans %= (10**9+7)

else:
    ans = fib(a[0]-1)
    for i in range(M-1):
        ans = (ans * fib(a[i+1]-a[i]-2))%(10**9+7)

    ans = (ans * fib(N-a[-1]-1))%(10**9+7)

print(ans)
import functools
import math

N,X = map(int,input().split())
x = list(map(int,input().split()))
x2 = []

for i in range(len(x)):
    x2.append(abs(x[i]-X))

gcd = functools.reduce(math.gcd, x2)
print(gcd)

### FIXED CODE ###

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

def gcd(x1,x2):
    while x2 != 0:
        x1,x2 = x2, x1%x2
    return x1

for i in range(len(x)):
    x[i] = abs(x[i]-X)

ans = x[0]
for i in range(1,len(x)):
    ans = gcd(ans,x[i])
print(ans)
a,b=map(int,input.split())

def xor(n):
    ret=0
    i=1
    while True:
        div,mod=divmod(n,i)
        flg=i*(div//2)
        if div%2==1:
            flag+=(mod+1)
        if flg%2==1:
            ret+=i
        i*=2
        if i>n:
            break
    return ret
print(xor(a-1)^xor(b))

### FIXED CODE ###

a,b=map(int,input().split())

def xor(n):
    ret=0
    i=1
    while True:
        div,mod=divmod(n,i)
        flg=i*(div//2)
        if div%2==1:
            flg+=(mod+1)
        if flg%2==1:
            ret+=i
        i*=2
        if i>n:
            break
    return ret
print(xor(a-1)^xor(b))
import sys
sys.setrecursionlimit(2000000000)

def comb(n,r):
  def cmb(n, r, p):
      if (r < 0) or (n < r):
          return 0
      r = min(r, n - r)
      return fact[n] * factinv[r] * factinv[n-r] % p

  p = 10 ** 9 + 7
  N = 10 ** 6  # N は必要分だけ用意する
  fact = [1, 1]  # fact[n] = (n! mod p)
  factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
  inv = [0, 1]  # factinv 計算用

  for i in range(2, N + 1):
      fact.append((fact[-1] * i) % p)
      inv.append((-inv[p % i] * (p // i)) % p)
      factinv.append((factinv[-1] * inv[-1]) % p)
  return cmb(n, r, p)

a1,b1,a2,b2=map(int,input().split())
score=comb(a2+b2+2,a2+1)-comb(a2+b1+1,a2+1)-comb(a1+b2+1,a1)+comb(a1+b1,a1)
print(score%(10**9+7))

### FIXED CODE ###

a1,b1,a2,b2=map(int,input().split())

import sys
sys.setrecursionlimit(2000000000)

p = 10 ** 9 + 7
N = a2+b2+2  # N は必要分だけ用意する
R = max(a2+1,b2+1)
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用

for i in range(2, N + 1):
  fact.append((fact[-1] * i) % p)
  
for i in range(2, R + 1):
  inv.append((-inv[p % i] * (p // i)) % p)
  factinv.append((factinv[-1] * inv[-1]) % p)

def comb(n, r, p):
  if (r < 0) or (n < r):
    return 0
  r = min(r, n - r)
  return fact[n] * factinv[r] * factinv[n-r] % p

score=comb(a2+b2+2,a2+1,p)-comb(a2+b1+1,a2+1,p)-comb(a1+b2+1,a1,p)+comb(a1+b1,a1,p)
print(score%(10**9+7))
from math import gcd
from functools import reduce


def resolve():
    n = int(input())
    t = list(int(input()) for _ in range(n))
    print(lcm(t))


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


def lcm(numbers):
    return reduce(lcm_base, numbers, 1)


if __name__ == "__main__":
    resolve()


### FIXED CODE ###

from fractions import gcd
from functools import reduce


def resolve():
    n = int(input())
    t = list(int(input()) for _ in range(n))
    res = 1
    for ti in t:
        res = lcm_base(res, ti)
    print(res)


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


def lcm(numbers):
    return reduce(lcm_base, numbers, 1)


if __name__ == "__main__":
    resolve()
r,g,b=map(int,input().split())
if (100*r+10*g+b)%4==0:
  print(YES)
else:
  print(NO)

### FIXED CODE ###

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