Harryxun/stf_run huggingface dataset:
a, b = map(int, input().split())

import math
as = math.ceil(a / 0.08)
al = math.floor((a + 1) / 0.08)
bs = math.ceil(b / 0.10)
bl = math.floor((b + 1) / 0.10)

for i in range(1000):
    if as <= i < al and bs <= i < bl:
        print(i)
        break

### FIXED CODE ###

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

import math
aS = math.ceil(a / 0.08)
al = math.floor((a + 1) / 0.08)
bs = math.ceil(b / 0.10)
bl = math.floor((b + 1) / 0.10)

flag = True
for i in range(10000):
    if aS <= i < al and bs <= i < bl:
        print(i)
        flag = False
        break
if flag:
    print(-1)
#import numpy as np???????????????
n, m = map(int, raw_input().split())
 
a = [[0]*m for i in xrange(n)]
 
b = [0]*m
 
for i in xrange(n):
    tmp = map(int, raw_input().split())
    for j in xrange(m):
        a[i][j] = tmp[j]
for i in xrange(m):
    b[i] = input()
for i in xrange(n):
    tmp = 0
    for j in xrange(m):
        tmp += a[i][j] * b[j]
    print tmp

### FIXED CODE ###

n, m = map(int, raw_input().split())
 
a = [[0]*m for i in xrange(n)]
 
b = [0]*m
 
for i in xrange(n):
    tmp = map(int, raw_input().split())
    for j in xrange(m):
        a[i][j] = tmp[j]
for i in xrange(m):
    b[i] = input()
for i in xrange(n):
    tmp = 0
    for j in xrange(m):
        tmp += a[i][j] * b[j]
    print tmp
N, M = map(int, input().split())
X = list(map(int, input().split()))
X = sorted(X)
L = []
for i in range(0, M-1):
    L.append(X[i+1] - X[i])
L = sorted(L, reverse = True)
S = 0
for i in range(N-1):
    S += L[i]
res = X[M-1] - X[0] - S
print(res)

### FIXED CODE ###

N, M = map(int, input().split())
X = list(map(int, input().split()))
if N >= M:
    print(0)
else:
    X = sorted(X)
    L = []
    for i in range(0, M-1):
        L.append(X[i+1] - X[i])
    L = sorted(L, reverse = True)
    S = 0
    for i in range(N-1):
        S += L[i]
    res = X[M-1] - X[0] - S
    print(res)
N, M = map(int, input().split())

p_list = []
y_list = []
shi_map = {}

for i in range(M):
    p, y = map(int, input().split())
    p_list.append(p)
    y_list.append(y)
    if p in shi_map:
        shi_map[p].append(y)
    else:
        shi_map[p] = [y]
shi_map = sorted(shi_map.items(), key=lambda x: x[0])
shi_map = dict(shi_map)
count_p = len(set(p_list))
shi_list = list(map(sorted, shi_map.values()))
for i in range(M):
    p = p_list[i]
    y = y_list[i]
    if p > count_p:
        s = shi_list[p - 2 - count_p]
    else:
        s = shi_list[p-1]
    j = s.index(y)
    p_str = str(p).zfill(6)
    j_str = str(j+1).zfill(6)
    print(p_str + j_str)



### FIXED CODE ###

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

shi_map = []

for i in range(M):
    p, y = map(int, input().split())
    shi_map.append([i, p, y])

shi_map = sorted(shi_map, key=lambda x: (x[1], x[2]))

result = {}
shi_count = {}
for i, p, y in shi_map:

    if p in shi_count:
        c = shi_count[p]
        count = c + 1
        shi_count[p] = count
    else:
        shi_count[p] = 1
        count = 1
    result[i] = [p, count]
result = list(sorted(result.items(), key=lambda x: x[0]))

for i, p in result:

    p2 = str(p[0]).zfill(6)

    y = str(p[1]).zfill(6)
    r = p2+y
    print(r)
a,b=map(int, input().split("\n"))
print(len(b.split("ABC"))-1)

### FIXED CODE ###

a = input()
a = input()
print(a.count("ABC"))
import subprocess as sp
import sys
code = r"""
n=int(input())
a=[int(j) for j in input().split()]
dp=[[0]*(n+1) for i in range(n+1)]

for i in range(n)[::-1]:
    for j in range(i,n):
        if (n+i-j-1)%2==0:
            dp[i][j]=max(dp[i+1][j]+a[i],dp[i][j-1]+a[j])
        else:
            dp[i][j]=min(dp[i+1][j]-a[i],dp[i][j-1]-a[j])
print(dp[0][n-1])

"""
with open("A.py","w") as f:
	f.write(code)
sp.Popen(['pypy','-std=pypy','-O2',"A.py"]).communicate()
sp.Popen(['./a.out'],stdin=sys.stdin,stdout=sys.stdout).communicate()


### FIXED CODE ###

n=int(input())
a=[int(j) for j in input().split()]
dp=[[0]*(n+1) for i in range(n+1)]

for i in range(n)[::-1]:
    for j in range(i,n):
        if (n+i-j-1)%2==0:
            dp[i][j]=max(dp[i+1][j]+a[i],dp[i][j-1]+a[j])
        else:
            dp[i][j]=min(dp[i+1][j]-a[i],dp[i][j-1]-a[j])
print(dp[0][n-1])
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import numpy as np
import statistics
from statistics import mean, median,variance,stdev
import math

def main():
	N = int(input())
	xy = []
	for i in range(N):
		x, y = map(int, input().split(" "))
		xy.append((x, y))
		
	re = {}
	for i, val in enumerate(xy):
		x, y = val
		for j, vol in enumerate(xy):
			if i == j:
				continue
			nx, ny = vol
			p = nx - x
			q = ny -y
			if (p, q) in re:
				re[(p, q)] += 1
			else:
				re[(p, q)] = 1
				
	ans = N - max(re.values())
	
	print(ans)
	
	
if __name__ == "__main__":
	main()


### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import numpy as np
import statistics
from statistics import mean, median,variance,stdev
import math

def main():
	N = int(input())
	xy = []
	for i in range(N):
		x, y = map(int, input().split(" "))
		xy.append((x, y))
		
	if N == 1:
		print(1)
		sys.exit()
		
	re = {}
	for i, val in enumerate(xy):
		x, y = val
		for j, vol in enumerate(xy):
			if i == j:
				continue
			nx, ny = vol
			p = nx - x
			q = ny -y
			if (p, q) in re:
				re[(p, q)] += 1
			else:
				re[(p, q)] = 1
				
	ans = N - max(re.values())
	
	print(ans)
	
	
if __name__ == "__main__":
	main()
n = int(inout()) # the number of takoyaki
delicious = list(map(int,input().split()))
ans = 0
for i in range(0, n-1): 
  for j in range(i, n):
    ans += delicious[i] * delicious[j]
    
print(ans)

### FIXED CODE ###

n = int(input()) # the number of takoyaki
delicious = list(map(int,input().split()))
ans = 0
for i in range(0, n-1): 
  for j in range(i+1, n):
    ans += delicious[i] * delicious[j]
    
print(ans)
while True:
    for c in itertools.combinations(a, 3):
        if c[0] ^ c[2] == c[1]:
            if len(a) == 3:
                print("Yes")
                exit()
            else:
                a.remove(c[1])
                break
        elif c[1] ^ c[2] == c[0]:
            if len(a) == 3:
                print("Yes")
                exit()
            else:
                a.remove(c[0])
                break
        elif c[0] ^ c[1] == c[2]:
            if len(a) == 3:
                print("Yes")
                exit()
            else:
                a.remove(c[2])
                break
        else:
            print("No")
            exit()

### FIXED CODE ###

a = [input() for i in range(2)]
 
N = int(a[0])
data = a[1].split(' ')
 
data = [int(i) for i in data]
 
result = []
a = 0
for i in range(N):
    a = a ^ data[i]
    
if a == 0:
    print('Yes')
    exit()
    
print('No')
args = sys.argv[1]
print(args*args)

### FIXED CODE ###

from sys import stdin

a = stdin.readline().rstrip()
a = int(a)
print(a*a)
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

X,N = MI()

if N == 0:
    print(X)
    exit()

P = LI()

_min = 10**9
ans = []
for p in range(1,101):
    if p in P:
        continue

    if abs(X-p) == _min:
        ans.append(p)
    elif abs(X-p) < _min:
        _min = abs(X-p)
        ans = []
        ans.append(p)

print(min(ans))



### FIXED CODE ###

from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

X,N = MI()

if N == 0:
    print(X)
    exit()

P = LI()

_min = 10**9
ans = []
for p in range(X+1):
    for i in [-1,1]:
        a = X + (i * p)
        if a not in P:
            print(a)
            exit()
N = int(input())
ans = 0
for i in range(1, N + 1):
if len(i) % 2 == 1:
ans += 1
print(ans)

### FIXED CODE ###

N = int(input())
ans = 0
for i in range(1, N + 1):
	if len(str(i)) % 2 == 1:
		ans += 1
print(ans)
# C
import math
#A:短針,B:長針,H:短針の位置,M:長針の位置
A,B,H,M = map(int,input().split(' '))

#radian = degree/180*PI
rad = abs(H/6*math.pi-M/30*math.pi)
rad = min(rad,360-rad)
print('{:.15f}'.format(A*A + B*B - 2*A*B*math.cos(rad))**0.5)

### FIXED CODE ###

# C
import math
#A:短針,B:長針,H:短針の位置,M:長針の位置
A,B,H,M = map(int,input().split(' '))
rad = abs((H*30+M/2)-M*6)
rad = math.radians(min(rad,360-rad))
print('{:.20f}'.format((A**2 + B**2 - 2*A*B*math.cos(rad))**0.5))
N = int(input())
S = []
for i in range(N):
    S.append(input())
    

#二部グラフ判定
L = [0 for i in range(N)]
L[0] = 1
q = [0]
res = 0

while len(q) > 0:
    idx = q.pop(-1)
    c = L[idx]*(-1)
    for i in range(N):
        if S[idx][i] == "1":
            if L[i] == 0:
                L[i] = c
                q.append(i)
            elif L[i] == c*(-1):
                res = 1
                q.clear()
                break
            

if res == 1:
    print(-1)
else:
    # Warshall-Floyd法で直径を求める
    d = [[10**4 for j in range(N)] for i in range(N)]
    # initialize
    for i in range(N):
        for j in range(N):
            if S[i][j] == "1":
                d[i][j] = 1
    
    # DP
    for k in range(N):
        for i in range(N):
            for j in range(N):
                if i != j:
                    d[i][j] = min(d[i][j], d[i][k]+d[k][j])

                
    ans = 0
    for i in range(N):
        for j in range(N):
            if d[i][j] < 10**4:
                ans = max(ans, d[i][j])
                
    print(ans+1)

### FIXED CODE ###

N = int(input())
S = []
for i in range(N):
    S.append(input())
    

#二部グラフ判定
L = [0 for i in range(N)]
L[0] = 1
q = [0]
res = 0

while len(q) > 0:
    idx = q.pop(-1)
    c = L[idx]*(-1)
    for i in range(N):
        if S[idx][i] == "1":
            if L[i] == 0:
                L[i] = c
                q.append(i)
            elif L[i] == c*(-1):
                res = 1
                q = []
                break
            

if res == 1:
    print(-1)
else:
    # Warshall-Floyd法で直径を求める
    d = [[10**4 for j in range(N)] for i in range(N)]
    # initialize
    for i in range(N):
        for j in range(N):
            if S[i][j] == "1":
                d[i][j] = 1
    
    # DP
    for k in range(N):
        for i in range(N):
            for j in range(N):
                if i != j:
                    d[i][j] = min(d[i][j], d[i][k]+d[k][j])

                
    ans = 0
    for i in range(N):
        for j in range(N):
            if d[i][j] < 10**4:
                ans = max(ans, d[i][j])
                
    print(ans+1)
N=int(input())
l=list(map(int,input().split()))

if N==2 and l[1]-l[0]<(-1):
    print("No")
    exit()
    

for i in range(N-2):
    if l[i+2]-l[i+1]<(0) and l[i+i]-l[i]<(0):
        print("No")
        exit()
    elif l[i+i]-l[i]<(-1):
        print("No")
        exit()

print("Yes")

### FIXED CODE ###

# coding: utf-8
# Your code here!

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

high=l[0]
for i in range(N-1):
    if l[i+1]-l[i]<(-1):
        print("No")
        exit()
    high=max(high,l[i+1])
    if l[i+1]<(high-1):
        print("No")
        exit()
        
print("Yes")
T,X = input().split()
print(T/X)

### FIXED CODE ###

T,X = map(float,input().split())
print(T/X)
import sys
sys.setrecursionlimit(10**7)

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

ab = [[] for j in range(n)]
cd = [[] for j in range(n)]

for i in range(m):
    a,b = map(int,input().split())
    ab[a-1].append(b-1)
    ab[b-1].append(a-1)
    
for i in range(k):
    c,d = map(int,input().split())
    cd[c-1].append(d-1)
    cd[d-1].append(c-1)
    
check = [-1]*n

def dfs(x,check):
    #if check[x] != -1:
    #    return
    for i in range(len(ab[x])):
        cho = ab[x][i]
        #print(cho,x)
        if check[cho] != -1:
            continue
        check[cho] = num
        dfs(cho,check)
    
    return

num = 0
for i in range(n):
    #print(i,check[i])
    if check[i] != -1:
        continue
    dfs(i,check)
    num += 1
#print(check)
grp_num = max(check)
grp_size = [0]*(grp_num+1)

for i in range(n):
    grp_size[check[i]] += 1
    
for i in range(n):
    hiku = 0
    for j in range(len(cd[i])):
        #print(cd[i],check[i],cd[i][j],check[cd[i][j]])
        if check[cd[i][j]] == check[i]:
            hiku += 1
            #print(hiku,hiku,hiku,hiku,hiku)
    #print(grp_size[check[i]]-len(ab[i])-hiku-1,end=' ')

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)

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

ab = [[] for j in range(n)]
cd = [[] for j in range(n)]

for i in range(m):
    a,b = map(int,input().split())
    ab[a-1].append(b-1)
    ab[b-1].append(a-1)
    
for i in range(k):
    c,d = map(int,input().split())
    cd[c-1].append(d-1)
    cd[d-1].append(c-1)
    
check = [-1]*n

def dfs(x,check):
    #if check[x] != -1:
    #    return
    for i in range(len(ab[x])):
        cho = ab[x][i]
        #print(cho,x)
        if check[cho] != -1:
            continue
        check[cho] = num
        dfs(cho,check)
    
    return

num = 0
for i in range(n):
    #print(i,check[i])
    if check[i] != -1:
        continue
    dfs(i,check)
    num += 1
#print(check)
grp_num = max(check)
grp_size = [0]*(grp_num+1)

for i in range(n):
    if check[i] == -1:
        continue
    grp_size[check[i]] += 1

for i in range(n):
    hiku = 0
    for j in range(len(cd[i])):
        #print(cd[i],check[i],cd[i][j],check[cd[i][j]])
        if check[cd[i][j]] == check[i]:
            hiku += 1
            #print(hiku,hiku,hiku,hiku,hiku)
    if check[i] == -1:
        print(0)
    else:
        print(grp_size[check[i]]-len(ab[i])-hiku-1,end=' ')
S=input()
T=input()
n=len(S)
m=len(T)

for i in range(n-m+1,-1,-1) :
    x=S[i:i+m]
    print(x)
    for j in range(m+1):
        if j==m :
            print((S[:i]+T+S[i+m:]).replace("?","a"))
            exit()
        if x[j]=="?" :
            continue
        elif x[j]!=T[j] :
            break
 
print("UNRESTORABLE")


### FIXED CODE ###

S=input()
T=input()
n=len(S)
m=len(T)

for i in range(n-m,-1,-1) :
    x=S[i:i+m]
    for j in range(m+1):
        if j==m :
            print((S[:i]+T+S[i+m:]).replace("?","a"))
            exit()
        if x[j]=="?" :
            continue
        elif x[j]!=T[j] :
            break
 
print("UNRESTORABLE")
n,m,q = map(int,input().split())
LR = []
ansl = []
for _ in range(m):
    LR.append(list(map(int,input().split())))
for _ in range(q):
    p,q = map(int,input().split())
    ans = 0
    for i in range(m):
        if p<=LR[i][0] and LR[i][1] <= q:
            ans += 1
    ansl.append(ans)
for i in range(q):
    print(ansl[i])

### FIXED CODE ###

n, m, Q = map(int, input().split())
data = [[0]*(n+2) for i in range(n+2)]
for i in range(m):
    l, r = map(int, input().split())
    data[l][r] += 1

for i in range(n+2):
    for j in range(n+1):
        data[i][j+1] += data[i][j]

for i in range(n+1, -1, -1):
    for j in range(n+2):
        data[i-1][j] += data[i][j]

for i in range(Q):
    p, q = map(int, input().split())
    print(data[p][q])
N=int(input())
temp=input().split()
A=[int(temp[i]) for i in range(N)]

A=[A[-1]]+A

for i in range(N):
  print(mean(A[i:i+2]))

### FIXED CODE ###

N=int(input())
temp=input().split()
A=[int(temp[i]) for i in range(N)]
As=[]
As.append(sum([A[i]*pow(-1, i) for i in range(N)]))
for i in range(1, N):
  As.append(A[i-1]-As[i-1])

x1=As[0]/2
print(int(2*x1), end=' ')

for i in range(1, N):
  print(2*int(As[i]-x1*pow(-1, i)), end=' ')
N = int(input())
R = int(input())
if N > 1 & N <100 & R > 0 & R < 4111 :
  if N >= 10 :
    print(R)

  else :
    print(R-100*(10-N))
else:
  print('error')

### FIXED CODE ###

N,R = map(int,input().split())
if N >= 10:
  print(R)
else:
  print(R+100*(10-N))
k = input()
    l = list(map(int,input().split(' ')))
    c = 0
    for i in range(len(l)-1):
      x = l[i+1]-lis[i]
      if x<0:
        l[i+1]+=abs(x)
      	c+=abs(x)
    print(c)

### FIXED CODE ###

try:
    k = int(input())
    l = list(map(int,input().split(' ')))
    c = 0
    for i in range(len(l)-1):
      x = l[i+1]-l[i]
      if x<0:
        l[i+1]+=abs(x)
        c+=abs(x)
    print(c)
except:
    pass
l=list(map(int,input().split()))
n=l[0]
m=l[1]
q=l[2]
lr=[]
pq=[]
for i in range(m):
    lr.append(input())
for i in range(q):
    pq.append(input())
w=0    
for i in range(q):
    ppqq=list(map(int,pq[i].split()))
    w=0
    for j in range(m):
        llrr=list(map(int,lr[j].split()))
        if llrr[0]>= ppqq[0] and llrr[1]<=ppqq[1]:
            w+=1
    print(w)


### FIXED CODE ###

ss=input()
k=int(input())
s=[int(i) for i in ss ]
#ls=len(s)
j=0
q=0
w=0
while q==0:
    if s[j]==1:
        w+=1
        if k<=w:
            print(1)
            q=1
        j+=1
    else:
        print(s[j])
        q=1
h1 = int(raw_input())

h1 = h1**3

print( h1 )



### FIXED CODE ###

import sys
input_line2 = int(sys.stdin.readline())
#print ("\r\n")
print (input_line2**3)
#print ("\r\n")
a=input()

b=input()

if int(a)+int(b)<10:
  print(a+b)
else:
  print('error')
  


### FIXED CODE ###

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

if a+b<10:
  print(a+b)
else:
  print("error")
n = int(input())
cnt == 0
for i in range(n):
    c = list(input())
    v = list(input())
    if int(c[i]) > int(v[i]):
        cnt += (int(c[i]) - int(v[i]))
print(cnt)     

### FIXED CODE ###

n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
cnt = 0
for i in range(n):
    if v[i] > c[i]:
        cnt += (v[i] - c[i])
print(cnt)
from collections import deque
n,m = list(map(int,input().split()))
e = [[] for _ in range(m+1)]
for i in range(m):
    a,b = list(map(int,input().split()))
    e[a].append(b)
    e[b].append(a)

q = deque()
q.append(1)

s = [float('inf') for _ in range(n+1)]
t = [-1 for _ in range(n+1)]
s[1] = 0
while len(q):
    node = q.pop()
    step = s[node]+1
    for i in range(len(e[node])):
        nex = e[node][i]
        if s[nex] > step:
            q.append(nex)
            s[nex] = step
            t[nex] = node
# print(s,t,e)
print("Yes")
for i in range(2,n+1):
    print(t[i])

### FIXED CODE ###

from collections import deque

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

for i in range(m):
    a,b = list(map(int,input().split()))
    e[a].append(b)
    e[b].append(a)
q = deque()
q.append(1)
t = [-1 for _ in range(n+1)]

while len(q):
    node = q.popleft()

    for i in range(len(e[node])):
        nex = e[node][i]
        if t[nex] == -1:
            q.append(nex)
            t[nex] = node
print("Yes")
for i in range(2,n+1):
    print(t[i])
class UnionFind():
    # 作りたい要素数nで初期化
    # 使用するインスタンス変数の初期化
    def __init__(self, n):
        self.n = n
        # root[x]<0ならそのノードが根かつその値が木の要素数
        # rootノードでその木の要素数を記録する
        self.root = [-1]*(n+1)
        # 木をくっつける時にアンバランスにならないように調整する
        self.rnk = [0]*(n+1)
        
        self.par = [0]*(n+1)

    # ノードxのrootノードを見つける
    def Find_Root(self, x):
        if(self.root[x] < 0):
            return x
        else:
            # ここで代入しておくことで、後の繰り返しを避ける
            self.root[x] = self.Find_Root(self.root[x])
            
            return self.root[x]
    # 木の併合、入力は併合したい各ノード
    def Unite(self, x, y):
        tmpx,tmpy=x,y
        # 入力ノードのrootノードを見つける
        x = self.Find_Root(x)
        y = self.Find_Root(y)
        # すでに同じ木に属していた場合
        if(x == y):
            return 
        # 違う木に属していた場合rnkを見てくっつける方を決める
        elif(self.rnk[x] > self.rnk[y]):
            self.root[x] += self.root[y]
            self.root[y] = x
            self.par[tmpy]  =tmpx

        else:
            self.root[y] += self.root[x]
            self.root[x] = y
            self.par[tmpx]  = tmpy
            # rnkが同じ（深さに差がない場合）は1増やす
            if(self.rnk[x] == self.rnk[y]):
                self.rnk[y] += 1
    # xとyが同じグループに属するか判断
    def isSameGroup(self, x, y):
        return self.Find_Root(x) == self.Find_Root(y)

    # ノードxが属する木のサイズを返す
    def Count(self, x):
        return -self.root[self.Find_Root(x)]


def cur(i):
    if memo[i]==-1: memo[i]=(cur(tree.par[i])+state[i])%2
    return memo[i]

N=int(input())
tree=UnionFind(N)

state=[-1]*(N+1)
for i in range(N-1):
    u,v,w=map(int,input().split())
    tree.Unite(u,v)
    if tree.par[u]==v: state[u]=w%2
    if tree.par[v]==u: state[v]=w%2

memo=[-1]*(N+1)
memo[tree.Find_Root(1)]=0
for i in range(1,N+1):
    print(cur(i))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)

def cur(current,e,dist,color):
    for it in e[current]:
        if color[it]!=-1: continue
        color[it]=(color[current]+dist[(it,current)])%2
        cur(it,e,dist,color)

N=int(input())
e=[[] for i in range(N+1)]
dist={}
for i in range(N-1):
    u,v,w=map(int,input().split())
    e[u].append(v)
    e[v].append(u)
    dist[(u,v)],dist[(v,u)]=w,w
memo=[-1]*N




color=[-1]*(N+1)
color[1]=0
cur(1,e,dist,color)

for i in range(1,N+1):
    print(color[i])
a, b = list(map(int, input().split()))
s = input()
l = s.split("-")
if len(l) != 2:
  ans = "No"
elif len[0]==a and len[1] == b:
  ans = "Yes"
else:
  ans = "No"
print(ans)


### FIXED CODE ###

a, b = list(map(int, input().split()))
s = input()
l = s.split("-")
if len(l) != 2:
  ans = "No"
elif len(l[0])==a and len(l[1]) == b:
  ans = "Yes"
else:
  ans = "No"
print(ans)
import itertools

N = int(input())

# 頭文字Mグループ、頭文字Aグループ、のように分割する
# どの3つのグループから1人選ぶかを考える

n_initial_MARCH = [0]*5
match_initial = ["M", "A", "R", "C", "H"]
for _ in range(N):
    s = input()
    for idx in range(5):
        if s[0] == match_initial[idx]:
            n_initial_MARCH[idx] += 1

taken_indices = list(itertools.combinations([idx for idx in range(N) if n_initial_MARCH[idx] > 0], 3))

ans = 0

for groups in taken_indices:
    ans += n_initial_MARCH[groups[0]] * n_initial_MARCH[groups[1]] * n_initial_MARCH[groups[2]]

print(ans)

### FIXED CODE ###

import itertools

N = int(input())

# 頭文字Mグループ、頭文字Aグループ、のように分割する
# どの3つのグループから1人選ぶかを考える

n_initial_MARCH = [0]*5
match_initial = ["M", "A", "R", "C", "H"]
for _ in range(N):
    s = input()
    for idx in range(5):
        if s[0] == match_initial[idx]:
            n_initial_MARCH[idx] += 1

taken_indices = list(itertools.combinations([idx for idx in range(5) if n_initial_MARCH[idx] > 0], 3))

ans = 0

for groups in taken_indices:
    ans += n_initial_MARCH[groups[0]] * n_initial_MARCH[groups[1]] * n_initial_MARCH[groups[2]]

print(ans)
a, b, c, d, e, k = int(input()) for i in range(6)
print("Yey!" if (e-a)<=k else ":(")

### FIXED CODE ###

a, b, c, d, e, k = [int(input()) for i in range(6)]
print("Yay!" if (e-a)<=k else ":(")
n, x =  map(int, input().split())
xi = map(int, input().strip().split())
c = [1] * x
xi = [x - y for (x,y) in zip(xi,c)]
def gcd(a, b):
  if b == 0: return a
  return gcd(b, a % b)
d0 = xi[0]
for i in range(n-1):
    d = gcd(xi[i+1],d0)
    d0 = d
print(d)    

### FIXED CODE ###

n, x =  map(int, input().split())
xi = map(int, input().strip().split())
c = [x] * n
xi = [x - y for (x,y) in zip(xi,c)]
def gcd(a, b):
  if b == 0: return a
  return gcd(b, a % b)
d0 = xi[0]
for i in range(n-1):
    d = gcd(xi[i+1],d0)
    d0 = d
if len(xi) == 1:
  d = xi[0]
print(abs(d))