Harryxun/stf_run huggingface dataset:
N = int(input())
adj = [[] for _ in range(N)]
for _ in range(N-1):
    u, v, w = map(int, input().split())
    u -= 1
    v -= 1
    adj[u].append((v, w))
    adj[v].append((u, w))

stack = [0]
color = [-1]*N
color[0] = 0
while stack:
    v = stack.pop()
    for child, w in adj[v]:
        if color[child] < 0:
            color[child] = (color[v] + w) % 2

for i in color:
    print(color)

### FIXED CODE ###

N = int(input())
adj = [[] for _ in range(N)]
for _ in range(N-1):
    u, v, w = map(int, input().split())
    u -= 1
    v -= 1
    adj[u].append((v, w))
    adj[v].append((u, w))

stack = [0]
color = [-1]*N
color[0] = 0
while stack:
    v = stack.pop()
    for child, w in adj[v]:
        if color[child] < 0:
            color[child] = (color[v] + w) % 2
            stack.append(child)

for i in color:
    print(i)
a = int(input())
b = int(input())

x = ( a * b )

if x % 2 == 0:
    print("Even")
elif x % 2 != 0:
    print("odd")



### FIXED CODE ###

a, b = map(int, input().split())
answer = a * b
if answer % 2 == 0:
    print('Even')
else:
    print('Odd')
date = input()

print(date.replace(date[4:],2018))

### FIXED CODE ###

date = input()
print(date.replace(date[:4],'2018'))
s = input()
if s[0] == "A" and s[2:-1].count("C") == 1:
  s[s[2:-1].find("C")] = c
  if s[1:].islower():
    print("AC")
  else:
    print("WA")
else:
  print("WA")

### FIXED CODE ###

s = input()
if s[0] == "A" and s[2:-1].count("C") == 1:
  index_C = s.find("C")
  if s[1:index_C].islower() and s[index_C+1:].islower():
    print("AC")
  else:
    print("WA")
else:
  print("WA")
import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)
  
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
  
N = int(input())
lst = list(map(int, input().split()))
lcm = lcm_list(lst)

a = 0
for i in range(N):
  a += int(lcm/lst[i])
print(a)


### FIXED CODE ###

def lcm(a):
    from fractions import gcd
    x = a[0]
    for i in range(1, len(a)):
        x = (x * a[i]) // gcd(x, a[i])
    return x
  
N = int(input())
lst = list(map(int, input().split()))
const = 10**9 + 7

def solve(arr):
    ab = lcm(arr)
    sum = 0
    for a in arr:
        sum += ab // a
    return sum % const

answer = solve(lst)

print(int(answer))
N, M = map(int, input().split())
s = [list(map(int, input().spllit()))[1:] for i in range(M)]
p = list(map(int, input().split()))
total = 0
j = 0
for i in range(2 ** N):
  now = format(i, '10b')
  for k in range(M):
    tmp = 0
    for l in s[k]:
      tmp += int(now[-l])
    if tmp % 2 == p[k]:
      j += 1
  if j == M :
    total += 1
  j = 0
print(total)


### FIXED CODE ###

n, m = map(int, input().split())
switch = []
for i in range(m):
    switch.append(list(map(int, input().split())))
p = list(map(int, input().split()))

ans = 0
for i in range(2**n):
    i = format(i, "0{}b".format(n))
    flag = 1
    for j in range(m):
        count = 0
        for k in range(switch[j][0]):
            if i[switch[j][k+1]-1] == "1":
                count += 1
        if count % 2 == p[j]:
            continue
        else:
            flag = 0
            break
    if flag == 1:
        ans += 1
print(ans)
import numpy as np
N, M = map(int, input().split())
H = list(map(int, input().split()))
AB = [list(map(int, input().split())) for _ in range(M)]
h = {}
ans = 0
for row in AB:
    if row[0] in h:
        h[row[0]].append(row[1])
    else:
        h[row[0]] = [row[1]]
    if row[1] in h:
        h[row[1]].append(row[0])
    else:
        h[row[1]] = [row[0]]
ans += sum([1 for i in range(1, N+1) if i not in h.keys()])
for hidx, otherh in h.items():
    if H[hidx-1] > max([H[idx-1] for idx in otherh]):
        ans += 1
print(ans)

### FIXED CODE ###

import numpy as np
N, M = map(int, input().split())
H = list(map(int, input().split()))
AB = [list(map(int, input().split())) for _ in range(M)]
h = {}
ans = 0
for row in AB:
    if row[0] in h:
        h[row[0]].append(row[1])
    else:
        h[row[0]] = [row[1]]
    if row[1] in h:
        h[row[1]].append(row[0])
    else:
        h[row[1]] = [row[0]]
ans += sum([1 for i in range(1, N+1) if i not in h.keys()])
for hidx, otherh in h.items():
    if H[hidx-1] > max([H[idx-1] for idx in otherh]):
        ans += 1
print(ans)
s=input()
c=0
l=["+","-"]
for i in range(2):
  if c!=0
  	break
  for j in range(2):
    	if c!=0
      		break
    for p in range(2):
      if eval(s[0]+l[i]+s[1]+l[j]+s[2]+l[p]+s[3])==7:
        print(s[0]+l[i]+s[1]+l[j]+s[2]+l[p]+s[3]+"=7")
        c=1
        break

### FIXED CODE ###

s=input()
c=0
l=["+","-"]
for i in range(2):
  if c!=0:
  	break
  for j in range(2):
    if c!=0:
      	break
    for p in range(2):
      if eval(s[0]+l[i]+s[1]+l[j]+s[2]+l[p]+s[3])==7:
        print(s[0]+l[i]+s[1]+l[j]+s[2]+l[p]+s[3]+"=7")
        c=1
        break
inp = map(int,input().split())
ans = inp[0]+inp[1]+inp[2]
if ans >= 22:
  print("bust")
 else:
  print("win")


### FIXED CODE ###

inp = list(map(int , input().split(" ")))
ans = inp[0]+inp[1]+inp[2]
if ans >= 22:
  print("bust")
else:
  print("win")
a, b, k = map(int, input().split())
c = list(range(a, b+1))
if len(c) < 2*k:
    for i in c:
        print(i)
else:
    for i in c[:k] + c[-k:]:
        print(i)

### FIXED CODE ###

a, b, k = map(int, input().split())
for i in range(a, min(b+1, a+k)):
    print(i)
for i in range(max(b-k+1, a+k), b+1):
    print(i)
alice, bob = int(raw_input().split())
if alice == 1: alice = 14
if bob == 1: bob = 14
if alice < bob:
   print 'Alice'
elif alice > bob:
   print 'Bob'
else:
   print 'Draw'


### FIXED CODE ###

alice, bob = [int(x) for x in raw_input().split()]
if alice == 1: alice = 14
if bob == 1: bob = 14
if alice < bob:
   print 'Bob'
elif alice > bob:
   print 'Alice'
else:
   print 'Draw'
n = int(input())
s = list(input())

a = []

for i in range(n-1):
    if s[i] != s[i+1]:
        a.append(s[i])

if s[-2] != s[-1]:
    a.append(s[-1])

if len(a) == 0:
    print(1)
else:
    print(len(a))


### FIXED CODE ###

import sys

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

if n == 1:
    print(1)
    sys.exit()

a = []

for i in range(n-1):
    if s[i] != s[i+1]:
        a.append(s[i])

if len(a) == 0:
    print(1)
else:
    if a[-1] != s[-1]:
        a.append(s[-1])

    print(len(a))
x,y=map(int,input().split())
res = []
if x>0 and y>0:
    res.append(abs(y-x))
elif x*y<0:
    res.append(1+abs(y+x))
elif x<0 and y<0:
    res.append(2+abs(y-x))
print(min(res))


### FIXED CODE ###

x,y=map(int,input().split())
res = 0
if 0<=x<=y:
    res = y-x
elif 0<y<x:
    res = x-y+2
elif y==0 and x>0:
    res = x+1
elif y==0 and x<0:
    res = abs(x)
elif x==0 and y>0:
    res = y
elif x==0 and y<0:
    res = abs(y)+1
elif x<0<y:
    res = abs(x+y)+1
elif y<0<x:
    res = abs(x+y)+1
elif x<=y<=0:
    res = y-x
elif y<x<=0:
    res = x-y+2
print(res)
A,B,C = input().split(' ')

if A== B:
    if B =!C:
        print('Yes')
    else:
        print('No')
else:
    if B == C or A ==C:
        print('Yes')
    else:
        print('No')

### FIXED CODE ###

A,B,C = input().split(' ')

if A== B:
    if B != C:
        print('Yes')
    else:
        print('No')
else:
    if B == C or A ==C:
        print('Yes')
    else:
        print('No')
def get_num():
    n = int(input())
    w = int(input())
    return n,w

def check_range(n,w):
    return n in range(1,101) and w in range(n**2)


def black_tiles(n,w):
    if (check_range(n,w)):
        return n**2 - w
    else:
        raise Exception('Value out of range')


if (__name__=='__main__'):
    n,w = get_num()
    print(black_tiles(n,w))
    

### FIXED CODE ###

def get_num():
    n = int(input())
    w = int(input())
    return n,w

def check_range(n,w):
    return n in range(1,101) and w in range(n**2+1)

def black_tiles(n,w):
    if (check_range(n,w)):
        return n**2 - w
    else:
        raise Exception('Value out of range')

if (__name__=='__main__'):
    print(black_tiles(*get_num()))
N = int(input())
train = [[] for _ in range(N)]
take_time = []
for cnt in range(N - 1):
    x, y , z = map(int,input().split())
    take_time.append(x)
    for _ in range(15001 ) :
        train[cnt].append(y)
        y += z

from bisect import bisect_left
for place in range(N):
    now = 0
    for i in range(place,N - 1):
        index = bisect_left(train[i],now)
        now = train[i][index]
        now += take_time[i]
    print(now)



### FIXED CODE ###

N = int(input())
train = [[] for _ in range(N)]
L = []
for cnt in range(N - 1):
    l = list(map(int,input().split()))
    L.append(l)

from math import ceil

from bisect import bisect_left
for place in range(N):
    now = 0
    for i in range(place,N - 1):
        k = max(0,ceil((now - L[i][1]) / L[i][2]))
        now = L[i][1] + L[i][2] * k
        now += L[i][0]
    print(now)
# https://atcoder.jp/contests/s8pc-4/tasks/s8pc_4_b

from itertools import combinations

N,K=map(int,input().split())
a=list(map(int,input().split()))

minc=10**12
ai=[i for i in range(N)]
for i in combinations(ai,K):
    ac=a[:]
    cost=0
    i=list(i)
    for j in range(1,K):
        costt=max(max(ac[:i[j]])-ac[i[j]]+1,0)
        ac[i[j]]+=costt
        costa+=costt
    minc=min(cost,minc)
print(minc)

### FIXED CODE ###

# https://atcoder.jp/contests/s8pc-4/tasks/s8pc_4_b

from itertools import combinations

N,K=map(int,input().split())
a=list(map(int,input().split()))

minc=10**12
ai=[i for i in range(N)]
for i in combinations(ai,K):
    ac=a[:]
    cost=0
    i=list(i)
    for j in range(1,K):
        costt=max(max(ac[:i[j]])-ac[i[j]]+1,0)
        ac[i[j]]+=costt
        cost+=costt
    minc=min(cost,minc)
print(minc)
import collections
N = int(input())
a = [int(input()) for i in range(N)]
c = collections.Counter(a)
tmp = c.values()
count=0
for i in range(len(tmp)):
  if tmp[i]%2!=0:
    count+=1
print(count)


### FIXED CODE ###

import collections
N = int(input())
a = [int(input()) for i in range(N)]
c = collections.Counter(a)
tmp = list(c.values())
count=0
for i in range(len(tmp)):
  if tmp[i]%2!=0:
    count+=1
print(count)
n = int(input())
A = [int(i) for i in input().split()]
A.insert(0, 0)

balls = list()
sums = dict()
# for i, a in enumerate(reversed(A)):
for bn in range(n, 0, -1):
    a = A[bn]
    if 2*bn > n:
        sums[bn] = a
        if a == 1:
            balls.append(str(bn))
    else:
        a2_sum = sums[2*bn]
        if a2_sum % 2 == a:
            # not
            sums[bn] = a2_sum
        else:
            # in
            sums[bn] = a2_sum + 1
            balls.append(str(bn))

# all_balls = len(balls)
# if all_balls % 2 != A[0]:
#     print(-1)
# else:
#     print(all_balls)
#     print(' '.join(balls))
print(all_balls)
print(' '.join(balls))


### FIXED CODE ###

n = int(input())
A = [int(i) for i in input().split()]
A.insert(0, 0)

boxes = dict()
have_balls = list()
for bn in range(n, 0, -1):
    a = A[bn]
    s = 0
    for t in range(2, n+1):
        if bn * t > n:
            break
        s += boxes[bn*t]

    if s % 2 == a:
        boxes[bn] = 0
    else:
        boxes[bn] = 1
        have_balls.append(str(bn))

print(len(have_balls))
print(' '.join(have_balls))
#!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect, string, copy
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
mod = 10**9+7
ans = inf
count = 0; pro = 1

d, g = map(int, input().split())
g //= 100
dp=[[inf]*(10**5+1010) for i in range(11)]
dp[0][0]=0
for i in range(d):
    p,c=map(int,input().split());c//=100
    for j in range(10**5+1010):
        if dp[i][j]!=inf:
            dp[i+1][j]=min(dp[i+1][j],dp[i][j])
            for k in range(1,p):
                dp[i+1][j+(i+1)*k]=min(dp[i+1][j+(i+1)*k],dp[i][j]+k)
            dp[i+1][j+(i+1)*p+c] = min(dp[i+1][j+(i+1)*p+c],dp[i][j]+p)
for i in range(g,10**5+10):
    ans=min(ans,dp[d][i])
print(ans)




# for i in range(1, d+1):
#     p, c = map(int, input().split())
#     c //= 100
#     # for key, value in tuple(D.items()):
#     #     print(D[key],p)
#     #     D[key+i*p+c//100] = min(D[key+i*p+c//100], D[key]+p)
#     S = D.copy()
#     for key, value in S.items():
#         for k in range(1, p):
#             # print(D[key+i])
#             D[key+i*k] = min(D[key+i*k], S[key]+k)
#         D[key+i*p+c] = min(D[key+i*p+c], S[key]+p)
# ans = inf
# for key, value in D.items():
#     # print(key,value)
#     if key >= g:
#         ans = min(ans, value)
# print(ans)


### FIXED CODE ###

#!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect, string, copy
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
mod = 10**9+7
ans = count = 0; pro = 1

d,g=map(int,input().split());g//=100
D=collections.defaultdict(lambda: inf )
D[0]=0
for i in range(1,d+1):
    p,c=map(int,input().split());c//=100
    # for key, value in tuple(D.items()):
    #     print(D[key],p)
    #     D[key+i*p+c//100] = min(D[key+i*p+c//100], D[key]+p)
    S=D.copy()
    for key,value in S.items():
        for k in range(1,p):    
        # print(D[key+i])
            D[key+i*k] = min(D[key+i*k],S[key]+k)
        D[key+i*p+c] = min(D[key+i*p+c],S[key]+p)
ans=inf
for key,value in D.items():
    # print(key,value)
    if key>=g:
        ans=min(ans,value)
print(ans)
n, l = map(int, input().split())
a = []
for x in range(n):
    a.append(input())
a.sort()
print("".join(a))



### FIXED CODE ###

a = sorted(list(map(int,input().split())))
if a == [5,5,7]:
	print("YES")
else:
	print("NO")
import numpy as np  # noqa
import numba  # noqa
from numba import njit, b1, i4, i8, f8  # noqa

m = 998244353
N, K = map(int, input().split())

jumps = []
for i in range(K):
    l, r = map(int, input().split())
    jumps.append([l, r])

jumps = np.array(jumps)


@njit((i8, i8, i8[:, :]), cache=True)
def main(N, m, jumps):
    dp = np.zeros(N + 1)
    dp[1] = 1
    for i in range(2, N + 1):
        for j in jumps:
            mn = max(0, i - j[1])
            mx = max(mn, i - j[0])
            dp[i] = (dp[i] + np.sum(dp[mn:mx + 1])) % m
    return dp[N]


print(int(main(N, m, jumps)))


### FIXED CODE ###

import sys
import numpy as np
import numba
from numba import njit, b1, i4, i8, f8

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

MOD = 998_244_353


@njit((i8, i8[:]), cache=True)
def main(N, LR):
    L, R = LR[::2], LR[1::2]
    K = len(L)
    F = np.zeros(N + 10, np.int64)
    F[0] = 1
    for n in range(1, N + 10):
        F[n] += F[n - 1]
        for k in range(K):
            l, r = L[k], R[k] + 1
            if n - l >= 0:
                F[n] += F[n - l]
            if n - r >= 0:
                F[n] -= F[n - r]
        F[n] %= MOD
    ans = F[N - 1] - F[N - 2]
    return ans % MOD


N, K = map(int, readline().split())
LR = np.array(read().split(), np.int64)

print(main(N, LR))
n, m = map(int, input().split())

d = np.ones((n, n)) * 1001

es = []
for i in range(m):
    es.append(list(map(int, input().split())))

for (i, j, w) in es:
    d[i - 1][j - 1] = w
    d[j - 1][i - 1] = w


for k in range(n):
    for i in range(n):
        for j in range(n):
            l = d[i][k] + d[k][j]
            if d[i][j] > l:
                d[i][j] = l

c = 0
for (i, j, w) in es:
    if d[i - 1][j - 1] < w:
        c += 1

print(c)


### FIXED CODE ###

import numpy as np

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

d = np.ones((n, n)) * 1001

es = []
for i in range(m):
    es.append(list(map(int, input().split())))

for (i, j, w) in es:
    d[i - 1][j - 1] = w
    d[j - 1][i - 1] = w


for k in range(n):
    for i in range(n):
        for j in range(n):
            l = d[i][k] + d[k][j]
            if d[i][j] > l:
                d[i][j] = l

c = 0
for (i, j, w) in es:
    if d[i - 1][j - 1] < w:
        c += 1

print(c)
import sys
import os
f = open('input.txt', 'r')
sys.stdin = f

N, M = list(map(int, input().split()))
list_WA = [0] * N
list_Flag = [0] * N
for i in range(M):
  a, b = list(map(str, input().split()))
  a=int(a)
  if list_Flag[a-1] == 1:
      pass
  else:
    if b=='WA':
      list_WA[a-1]=list_WA[a-1]+1
    elif b=='AC':
      list_Flag[a-1]=1
    else:
      pass
WA=sum(list_WA)
AC=sum(list_Flag)
ans=[AC,WA]
print(' '.join(map(str, ans)))


### FIXED CODE ###

N, M = list(map(int, input().split()))
list_WA = [0] * N
list_Flag = [0] * N
for i in range(M):
  a, b = list(map(str, input().split()))
  a=int(a)
  if not list_Flag[a-1] == 1:
    if b=='WA':
      list_WA[a-1]=list_WA[a-1]+1
    elif b=='AC':
      list_Flag[a-1]=1
penalty = [0] * N
for p in range(N):
    penalty[p]=list_WA[p]*list_Flag[p]
PE=sum(penalty)
AC=sum(list_Flag)
print(AC,PE)
多分再帰使うんだろうね

### FIXED CODE ###

import itertools
 
n = int(input())
H = list(map(int, input().split()))
 
count = 0
h_max = max(H)
for i in range(1, h_max + 1): #これが水位を上げる役割をしているのか
    watering = [(1 if h >= i else 0) for h in H] #これ以上いらないなら0　いるなら1
 
    itrs = itertools.groupby(watering)
    watering_group = [k for k, v in itrs if sum(list(v)) > 0] #ｋは要素の数字そのもの，連続するｋの並び
    count += sum(watering_group)

print(count)
A, B, K = map(int, input().split())
if A + B >= K:
    if A >= K:
        A -= K
    else:
    B -= (K - A)
    A = 0
else:
    A, B = 0, 0
print(A, B)

### FIXED CODE ###

A, B, K = map(int, input().split())
if A + B >= K:
    if A >= K:
        A -= K
    else:
        B -= (K - A)
        A = 0
else:
    A, B = 0, 0
print(A, B)
a, b, c = map(int, input().split())
print(int(a) + int(b) + int(c))

### FIXED CODE ###

a, b, c = map(int, list(input()))
print(a+b+c)
a =list(map(int,input().split()))
if a+b+c ==19 and a.count("7") ==2:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a = list(map(int,input().split()))
if sum(a) == 17 and a.count(5) == 2:
  print("YES")
else:
  print("NO")
#094c
N = int(input()) #N<200000=2 * 10**5
X_list = [int(e) for e in input().split()]

#l が奇数のとき，l 個の数 a1,a2,...,al の中央値とは，a1,a2,...,al の中で (l+1)/2番目に大きい値のことを言います．
#N個の数 X1,X2,...,XN が与えられます．ここで，N は偶数です． 
#i=1,2,...,N に対して，X1,X2,...,XN から Xi のみを除いたもの，すなわち X1,X2,...,Xi−1,Xi+1,...,XN の中央値を Biとします．
#i=1,2,...,Nに対して，Bi を求めてください．

X_list.sort(reverse=False)
print(X_list)
Bi_smaller = X_list[int(len(X_list)/2)]
Bi_bigger = X_list[int(len(X_list)/2 +1)]

for i in range(int(N/2)):
    print(Bi_bigger)
    
for i in range(int(N/2),N):
    print(Bi_smaller)

### FIXED CODE ###

#094c
import copy
N = int(input()) #N<200000=2 * 10**5
X_list = [int(e) for e in input().split()]

sort_X_list = copy.copy(X_list)
sort_X_list.sort(reverse=False)
Bi_smaller = sort_X_list[int(len(X_list)/2-1)]
Bi_bigger = sort_X_list[int(len(X_list)/2)]

for i in range(N):
    if X_list[i]>=Bi_bigger:
        print(Bi_smaller)
    else:
        print(Bi_bigger)
from collections import deque

z=list(input())
Q=deque()
Q.append(z)
q=int(input())

cnt=0

for i in range(q):
  x=input()
  if x[0]=='1':
    cnt+=1
    cnt%=2
    
  elif x[0]=='2':
    if x[2]=='1':
        if cnt%2==0:
            Q.appendleft(x[4])
        else:
            Q.append(x[4])

    else:
        if cnt%2==0:
            Q.append(x[4])
        else:
            Q.appendleft(x[4])
      
if cnt%2==1:
  Q.reverse()


print(''.join(Q))

### FIXED CODE ###

from collections import deque


Q=deque(list(input()))

q=int(input())

cnt=0

for i in range(q):
  x=input()
  if x[0]=='1':
    cnt+=1
    cnt%=2
    
  elif x[0]=='2':
    if x[2]=='1':
        if cnt%2==0:
            Q.appendleft(x[4])
        else:
            Q.append(x[4])

    else:
        if cnt%2==0:
            Q.append(x[4])
        else:
            Q.appendleft(x[4])
      
if cnt%2==1:
  Q.reverse()


print(''.join(Q))
N, A, B = map(int, input().split())

b = ''
while len(b) < N:
    b += 'b' * A
    b += 'r' * B

print(b[:N].count('b'))

### FIXED CODE ###

N, A, B = map(int, input().split())
num_put = A + B
num_blue = N // num_put * A + min(A, N % num_put)
print(num_blue)
import math
A,B=map(int,input().split())
print(A*B//math.gcd(A,B))

### FIXED CODE ###

from fractions import gcd
A,B=map(int,input().split())
print(A*B//gcd(A,B))
!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect, fractions
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0

a,b,c=map(int,input().split())
print(0)
for i in itertools.permutations([a,b,c],3):
    if i[0]==sum(i[1:]) or sum(i[:2])==i[2]:
        print("Yes")
        exit()

print("No")

### FIXED CODE ###

#!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect, fractions
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0

a,b,c=map(int,input().split())
for i in itertools.permutations([a,b,c],3):
    if i[0]==sum(i[1:]) or sum(i[:2])==i[2]:
        print("Yes")
        exit()

print("No")
l = int(input())
n = []
for i in range(l):
  n.append(input())
ac = 0
wa = 0
tle = 0
re =0
for i in n:
  if i == 'AC':
    ac += 1
  elif i =='WA':
    wa += 1
  elif i == TLE:
    tle += 1
  else:
    re += 1
print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(RE))

### FIXED CODE ###

l = int(input())
n = []
for i in range(l):
  n.append(input())
ac = 0
wa = 0
tle = 0
re =0
for i in n:
  if i == 'AC':
    ac += 1
  elif i =='WA':
    wa += 1
  elif i == 'TLE':
    tle += 1
  else:
    re += 1
print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))
import fractions
N = input()
k = fractions.gcd(2, N)
print(2*N / k)

### FIXED CODE ###

import fractions
N = int(input())
def lcm(x, y):
    return (x * y) / fractions.gcd(x, y)

print(int(lcm(2, N)))
n=int(input())
x=map(int,input().split())
y = sorted(x)
x1, x2 = y[n//2-1], y[n//2]
for i in range(n):
    if x[i]<=x1:
        print(x2)
    else:
        print(x1)


### FIXED CODE ###

n=int(input())
x=list(map(int,input().split()))
N=int(n/2)
y=sorted(x)
a=y[N-1]
b=y[N]
for j in range(n):
    if x[j]<=a:
        print(b)
    else:
        print(a)
import math
a,b = map(int,input().split())
def lcm(x, y):
    return (x * y) // math.gcd(x,y)
print(int(lcm(a,b)))

### FIXED CODE ###

import fractions
a,b = map(int,input().split())
def lcm(x,y):
    return (x * y) // fractions.gcd(x,y)
print(int(lcm(a,b)))
a,b=map(int,input())
print((3a+b)//2)

### FIXED CODE ###

a,b=map(int,input().split())
print((3*a+b)//2)
n, m = map(int, input().split())

a = [list(input()) for _ in range(n)]
b = [list(input()) for _ in range(m)]
for i in range(n):
    for j in range(n):
        if a[i][j] == b[0][0] and i + m - 1 < n and j + m - 1 < n:
            flag = 1
            for y in range(i, i + m):
                for x in range(j, j + m):
                    if a[i + y][j + x] != b[y][x]:
                        flag = 0
                        break
                
            if flag == 1:
                print("Yes")
                exit()

print("No")


### FIXED CODE ###

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

a = [list(input()) for _ in range(n)]
b = [list(input()) for _ in range(m)]
for i in range(n):
    for j in range(n):
        if a[i][j] == b[0][0] and i + m - 1 < n and j + m - 1 < n:
            flag = 1
            for y in range(m):
                for x in range(m):
                    if a[i + y][j + x] != b[y][x]:
                        flag = 0
                        break
                
            if flag == 1:
                print("Yes")
                exit()

print("No")
n,m=list(map(int, input().split()))
h=list(map(int, input().split()))
p=[]
remain = set(range(1, n+1))
for i in range(m):
    p.append(list(map(int, input().split())))
temp = []
for a,b in p:
    temp.append([b,a])
p = p + temp
for a,b in p:
    if h[a-1]<=h[b-1]:
        remain = remain - set(a)
print(len(remain))

### FIXED CODE ###

n,m=list(map(int, input().split()))
h=list(map(int, input().split()))
p=[]
remain = set(range(1, n+1))
for i in range(m):
    p.append(list(map(int, input().split())))
temp = []
for a,b in p:
    temp.append([b,a])
p = p + temp
delset = set()
for a,b in p:
    if h[a-1]<=h[b-1]:
        #remain = remain - set([a])
        delset.add(a)
remain = remain - delset
print(len(remain))