Harryxun/stf_run huggingface dataset:
class UnionFind:
    def __init__(self, n):
        self.n = n
        self.p = [e for e in range(n)]
        self.rank = [0] * n
        self.size = [1] * n

    def same(self, u, v):
        return self.find_set(u) == self.find_set(v)

    def unite(self, u, v):
        u = self.find_set(u)
        v = self.find_set(v)

        if u == v:
            return

        if self.rank[u] > self.rank[v]:
            self.p[v] = u
            self.size[u] += self.size[v]
        else:
            self.p[u] = v
            self.size[v] += self.size[u]
            if self.rank[u] == self.rank[v]:
                self.rank[v] += 1

    def find_set(self, u):
        if u != self.p[u]:
            self.p[u] = self.find_set(self.p[u])

        return self.p[u]

    def update_p(self):
        for u in range(self.n):
            self.find_set(u)

    def get_size(self, u):
        return self.size[self.find_set(u)]


n, m = map(int, input().split())
l = []
for _ in range(n):
    k, *ls = map(int, input().split())
    l.append(ls)

uf = UnionFind(m)

for li in l:
    for e1, e2 in zip(li, li[1:]):
        e1 -= 1
        e2 -= 1
        uf.unite(e1, e2)

p = uf.find_set(l[0][0])
ans = "YES"
for e, *_ in l:
    e -= 1
    if uf.find_set(e) != p:
        ans = "NO"

print(ans)


### FIXED CODE ###

class UnionFind:
    def __init__(self, n):
        self.n = n
        self.p = [e for e in range(n)]
        self.rank = [0] * n
        self.size = [1] * n

    def same(self, u, v):
        return self.find_set(u) == self.find_set(v)

    def unite(self, u, v):
        u = self.find_set(u)
        v = self.find_set(v)

        if u == v:
            return

        if self.rank[u] > self.rank[v]:
            self.p[v] = u
            self.size[u] += self.size[v]
        else:
            self.p[u] = v
            self.size[v] += self.size[u]
            if self.rank[u] == self.rank[v]:
                self.rank[v] += 1

    def find_set(self, u):
        if u != self.p[u]:
            self.p[u] = self.find_set(self.p[u])

        return self.p[u]

    def update_p(self):
        for u in range(self.n):
            self.find_set(u)

    def get_size(self, u):
        return self.size[self.find_set(u)]


n, m = map(int, input().split())
l = []
for _ in range(n):
    k, *ls = map(int, input().split())
    l.append(ls)

uf = UnionFind(m)

for li in l:
    for e1, e2 in zip(li, li[1:]):
        e1 -= 1
        e2 -= 1
        uf.unite(e1, e2)

p = uf.find_set(l[0][0] - 1)
ans = "YES"
for e, *_ in l:
    if uf.find_set(e - 1) != p:
        ans = "NO"

print(ans)
while(1):
  table = {}
  output = ''
  table_number = input()
  if table_number == 0:
    break
  for i in table_number:
    table.append(raw_input().split())
  string_number = input()
  for i in string_number:
    string = input()
    for table_element in table:
      if tabole_element[0] == string:
        string =table_element[1]
    output += string
  print output

### FIXED CODE ###

while(1):
  table = {}
  output = ''
  table_number = int(input())
  if table_number == 0:
    break
  for i in xrange(table_number):
    a, b = raw_input().split()
    table[a] = b
  string_number = int(input())
  for i in xrange(string_number):
    string = raw_input()[0]
    if string in table:
      output += table[string]
    else:
      output += string
  print output
input_line = raw_input()
a = []
for m in input_line.split(" "):
	a += [int(m)]
print(int(a[1]/a[2])-int(a[0]/a[2]+0.999)+1)

### FIXED CODE ###

a, b, c = map(int, input().split())
print(int(b/c)-int(a/c+0.999)+1)
n = int(input())
x = input()
'''再帰
def f(n):
    t = int(n,2) % list(n).count('1')
    if t == 0:
        return 1
    else:
        return f(str(bin(t))) + 1
'''
def f(n):
    
    t = int(n,2) % list(n).count('1')
    cnt = 1
    while(t):
        t = t % str(bin(t)).count('1')
        cnt += 1
        #print(cnt)
    return cnt

for i in range(n):
    xb = list(x)
    xb[i] = '0' if xb[i] == '1' else '1'
    print(f(''.join(xb)))

### FIXED CODE ###

n = int(input())
X = input()
x = int(X,2)
bitx = bin(x).count('1')
 
ans = [0]*(bitx+2)
for i in range(1,bitx+2):
    ans[i] = 1 + ans[i%bin(i).count('1')]
#print(ans)
l = []
bitp = bitx + 1
bitm = bitx - 1
xmp = 0
xmm = 0


if bitx != 1:
    for i in range(n):
        if X[i] == '1':
            xmp += pow(2, n-(i+1), bitp)
            xmm += pow(2, n-(i+1), bitm)
    for i in range(n):
        if X[i] == '1':
            xm = (xmm - pow(2,n-i-1,bitm)) % bitm
            l.append(str(1+ans[xm]))
        else:
            xm = (xmp + pow(2,n-i-1,bitp))%bitp
            l.append(str(1+ans[xm]))
 
else:
    for i in range(n):
        if X[i] == '1':
            xmp += pow(2, n-(i+1), bitp)
    for i in range(n):
        if X[i] == '1':
            l.append(str(0))
        else:
            xm = (xmp + pow(2,n-i-1,bitp))%bitp
            l.append(str(1+ans[xm]))
 
print('\n'.join(l))
import bisect,collections,copy,heapq,itertools,math,operator,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())
##################################################
N = I()
H = LI()
for i in range(N-1):
    print(H)
    if i==0:
        continue
    if H[i-1]<=H[i]<=H[i+1]:
        continue
    if H[i-1]<=H[i]-1<=H[i+1]:
        H[i] -= 1
    if H[i-1]<=H[i]<=H[i+1]:
        continue
    else:
        print('No')
        break
else:
    print('Yes')


### FIXED CODE ###

import bisect,collections,copy,heapq,itertools,math,operator,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())
##################################################
N = I()
H = LI()
if N==1:
    print('Yes')
    exit()
if N==2:
    print('Yes' if H[0]-1<=H[1] else 'No')
    exit()
for i in range(N-1):
    if i==0:
        H[i] -= 1
        continue
    if H[i-1]<=H[i]-1<=H[i+1]:
        H[i] -= 1
        continue
    if H[i-1]<=H[i]<=H[i+1]:
        continue
    print('No')
    break
else:
    print('Yes')
K = int(input())
S = input()
A = ""
if K < len(S):
	for i in range(K):
    	A = A + S[i]
    A = A + "..."
else:
	A = S
print(A)

### FIXED CODE ###

K = int(input())
S = input()
if K < len(S):
    A = ""
    for i in range(K):
        A = str(A) + S[i]
    A = str(A) + "..."
    S = A
print(S)
N, R = map(int, input().split())
if N => 10:
  O = R
else:
  O = R + 100*(10-N)
print(O)

### FIXED CODE ###

N, R = map(int, input().split())
if N >= 10:
  O = R
else:
  O = R + 100*(10-N)
print(O)
def main():
    output = C - A + B
    if output < 0:
        print(0)
    else:
        print(output)

main()

### FIXED CODE ###

def main():
    A, B, C = map(int, input().split())
    output = C - A + B
    if output < 0:
        print(0)
    else:
        print(output)
main()
N,A,B = map(int, input().split())

NxA = (N*B)

if NxA =< B:
    print(NxA)
else:
    print(B)


### FIXED CODE ###

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

N_A = (N*A)

if N_A <= B:
    print(N_A)
else:      
    print(B)
A, B = map(int, input().split())
# https://www.iandprogram.net/entry/2015/03/18/003511
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(x, x%y)
# https://qiita.com/kageyasai2/items/48ef81f39b4e31c6d396
def factorize(n):
    factor = [1]
    for num in range(2, n*0.5+1):
        while n % num == 0:
            n //= num
            factor.append(num)
    return set(factor)
    
g = gcd(A, B)
f = factorize(g)
print(len(f))

### FIXED CODE ###

from fractions import gcd
def f(n):
    tmp = n
    cnt = 0
    i = 2
    while i <= n**0.5 + 1:
        if tmp < i:
            break
        if tmp % i == 0:
            cnt += 1
            while tmp % i == 0:
                tmp //= i
        i += 1
    if tmp != 1:
        cnt += 1
    return cnt

A, B = map(int, input().split())
g = gcd(A, B)
ans = f(g) + 1
print(ans)
x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))
p.sort()
q.sort()
r.sort()
p = p[::-1]
p = [:x]
q = [::-1]
q = [:y]
ans = p + q + r
ans.sort()
print(sum(ans[:x+y]))


### FIXED CODE ###

x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))
p.sort()
q.sort()
r.sort()
p = p[::-1]
q = q[::-1]
r = r[::-1]

ir = 0
ig = 0

red = 0
for i in range(x):
    red += p[i]
    ir = i
green = 0
for i in range(y):
    green += q[i]
    ig = i

ino = 0
while (0 <= ir or 0 <= ig) and ino < c:
    iir = ir
    iig = ig
    iino = ino

    if ig < 0:
        if p[ir] < r[ino]:
            red -= p[ir]
            red += r[ino]
            ino += 1
            ir -= 1
    elif ir < 0:
        if q[ig] < r[ino]:
            green -= q[ig]
            green += r[ino]
            ino += 1
            ig -= 1
    elif p[ir] < q[ig]:
        if p[ir] < r[ino]:
            red -= p[ir]
            red += r[ino]
            ino += 1
            ir -= 1
    else:
        if q[ig] < r[ino]:
            green -= q[ig]
            green += r[ino]
            ino += 1
            ig -= 1

    if iir == ir and iig == ig and iino == ino:
        break

print(green + red)
while True:
    n = int(input())
    for _ in range(n):
        a, b = int(input()), int(input())
        x = str(a+b)
        print('overflow' if len(x) > 80 else x)

### FIXED CODE ###

N = int(input())
for _ in range(N):
    a = int(input())
    b = int(input())
    c = a + b
    length = len(str(c))
    print([c, "overflow"][length > 80])
menu = [int(input()) for _ in range(5)]
ans = 0
mod = []
for time in menu:
    if time % 10 == 0:
        ans += time
    else:
        ans += time
        mod.append(10 - time % 10)
mod.remove(max(mod))
ans += sum(mod)
print(ans)


### FIXED CODE ###

menu = [int(input()) for _ in range(5)]
ans = 0
mod = []
for time in menu:
    if time % 10 == 0:
        ans += time
    else:
        ans += time
        mod.append(10 - time % 10)
try:
    mod.remove(max(mod))
    ans += sum(mod)
except:
    pass
print(ans)
A, B = map(int, input().split())

t = A + B
x = A * B
m = A - B

a_flg = False
b_flg = False

if A >= 0:
  a_flg = True
if B >= 0:
  b_flg = True
  
if A == 0 or B == 0:
  print(t)
if a_flg and b_flg:
  print(x)
elif a_flg == True and b_flg == False:
  print(m)
elif a_flg == False and b_flg == True:
  print(t)
elif a_flg == False and b-flg == False:
  print(x)

### FIXED CODE ###

A, B = map(int, input().split())
 
t = A + B
x = A * B
m = A - B
 
map = {'t': t, 'x': x, 'm': m}

sorted_map = sorted(map.items(), key=lambda x:x[1])

ans = sorted_map[-1]
print(ans[-1])
a = list(map(int,input().split()))
 
for i in range(0, 1251):
  if a[0]/0.08 >= i and (a[0]-1)/0.08 < i and a[1]/0.1 >= i and (a[1]-1)/0.1 < i:
    print(i)
    return
print(-1)

### FIXED CODE ###

def f():
  a = list(map(float,input().split()))

  for i in range(0, 1251):
    if i >= a[0]/0.08 and i < (a[0]+1)/0.08 and i >= a[1]/0.1 and i < (a[1]+1)/0.1:
      print(i)
      return

  print(-1)

f()
import sys
import math
#a = []
#for l in sys.stdin:
#    a.append(int(l))
a = int(input())
b = int(input())
h = int(input())
m = int(input())

kak1 = float(h * 30 + m * 0.5)
kak2 = m * 6

kaku = kak1 -kak2 if kak1 < kak2 else kak2 - kak1
result = a * a + b * b - 2 * a * b * math.cos(kaku * math.pi / 180)
print(math.pow(result,0.5))

### FIXED CODE ###

import sys
import math

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

kak1 = float(h * 30 + m * 0.5)
kak2 = m * 6

kaku = kak1 -kak2 if kak1 < kak2 else kak2 - kak1
result = a * a + b * b - 2 * a * b * math.cos(kaku * math.pi / 180)
print(math.sqrt(result))
import collections
import sys
sys.setrecursionlimit(20000)
n, m  = [int(i) for i in input().split(' ')] 
edges = collections.defaultdict(list)
for i in range(m):
    s,d = [int(i) for i in input().split(' ')] 
    edges[s-1].append(d-1) 
dp = [-1]*n
maxPath = 0 
def dfs(node): 
    # global dp
    ans = 0 
    for i in edges[node]:
        if dp[i]>=0:
             ans = max(ans,dp[i]+1)
        else:
            ans = max(ans,dfs(i)+1)
    dp[node] = ans
    return ans
for i in range(n):
    maxPath = max(dfs(i), maxPath) 
print(maxPath)


### FIXED CODE ###

import collections
import sys
from functools import lru_cache
sys.setrecursionlimit(int(10**9))
n, m  = [int(i) for i in input().strip().split(' ')] 
edges = collections.defaultdict(list)
for i in range(m):
    s,d = [int(i) for i in input().strip().split(' ')]
    edges[s-1].append(d-1) 
# dp = [-1]*n
maxPath = 0 
@lru_cache(None)
def dfs(node): 
    ans = 0 
    for i in edges[node]:
        ans = max(ans,dfs(i)+1)
    return ans

for i in range(n):
    maxPath = max(dfs(i), maxPath) 
print(maxPath)
#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_5_B&lang=jp
count = 0
def merge(l,r):
    global count
    l_index = 0
    r_index = 0
    merge_list = []
    l.append(pow(10,9) + 1)
    r.append(pow(10,9) + 1)

    for k in range(len(l) + len(r) - 2):
        count += 1
        if l[l_index] < r[r_index]:
            merge_list.append(l[l_index])
            l_index += 1
        else:
            merge_list.append(r[r_index])
            r_index += 1

    return merge_list
    
def merge_sort(target_list):
    if len(target_list) == 1:
        return target_list
    
    mid = int(len(target_list) / 2)
    
    r = merge_sort(target_list[mid:])
    l = merge_sort(target_list[:mid])
    
    return merge(l, r)
    
if __name__ == "__main__":
    l = input()
    target_list = [int(a) for a in input().split()]
    global count
    print(" ".join([str(n) for n in merge_sort(target_list)]))
    print(count)

### FIXED CODE ###

#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_5_B&lang=jp
sentinel = pow(10,9) + 1
def merge(target_list, left_index, mid_index,right_index):
    
    l = target_list[left_index:mid_index] + [sentinel]
    r = target_list[mid_index:right_index] + [sentinel]
    l_target, r_target, count = 0, 0, 0
    #print(left_index, right_index, mid_index, l,r)
    for k in range(left_index, right_index):
        if l[l_target] < r[r_target]:
            target_list[k] = l[l_target]
            l_target += 1
        else:
            target_list[k] = r[r_target]
            r_target += 1

    return l_target + r_target
    #print(target_list)
            
def merge_sort(target_list, left_index, right_index):
    count = 0
    if left_index + 1 < right_index:
        mid_index = (left_index + right_index) // 2

        count += merge_sort(target_list, left_index, mid_index)
        count += merge_sort(target_list, mid_index, right_index)
        count += merge(target_list, left_index, mid_index,right_index)
        
    return count
if __name__ == "__main__":
    l = input()
    target_list = [int(a) for a in input().split()]
    count = merge_sort(target_list, 0, len(target_list))
    print(" ".join([str(n) for n in target_list]))
    print(count)
def lcs_len(x, y):
    indices = [0]
    for y_i in y:
        t_index = 0
        for i, index in enumerate(indices, 1):
            c_index = x.find(y_i, t_index) + 1
            if c_index:
                if i < len(indices):
                    t_index = indices[i]
                    indices[i] = min(c_index, t_index)
                else:
                    indices.append(c_index)
                    break
    print(len(indices) - 1)


def answer(X, Y):
    m, n = len(X), len(Y)
    C = [[0] * (n + 1) for _ in range(m + 1)]
    for i in range(1, m + 1):
        for j in range(1, n + 1):
            if X[i - 1] == Y[j - 1]:
                C[i][j] = C[i-1][j-1] + 1
            else:
                C[i][j] = max(C[i][j -1], C[i -1][j])
    return C[m][n]


if __name__ == '__main__':
    q = int(input())
    for _ in range(q):
        X = list(input())
        Y = list(input())
        lcs_len(X, Y)

### FIXED CODE ###

def lcs_better(X, Y):
    costs = [0]
    for c in Y:
        for i in range(len(costs) - 1, -1, -1):
            tmp = X.find(c, costs[i])
            if tmp + 1:
                if i + 1 < len(costs):
                    costs[i + 1] = min(costs[i + 1], tmp + 1)
                else:
                    costs.append(tmp + 1)
    return len(costs) - 1


def answer(X, Y):
    m, n = len(X), len(Y)
    C = [[0] * (n + 1) for _ in range(m + 1)]
    for i in range(1, m + 1):
        for j in range(1, n + 1):
            if X[i - 1] == Y[j - 1]:
                C[i][j] = C[i-1][j-1] + 1
            else:
                C[i][j] = max(C[i][j -1], C[i -1][j])
    return C[m][n]


if __name__ == '__main__':
    q = int(input())
    for _ in range(q):
        X = input()
        Y = input()
        print(lcs_better(X, Y))
import sys
import copy
from numba import njit

def I(): return int(sys.stdin.readline().rstrip())
def LI():return list(map(int,sys.stdin.readline().rstrip().split()))
def LS():return list(sys.stdin.readline().rstrip().split())

@njit('i8,i8,i8[::1]',cache=True)
def main(N,K,A):
    #print(N,K)
    #print(A)

    for k in range(K):
        B = [0]*N
        for i, a in enumerate(A):
            #print(i, a)
            if a == 0:
                B[i] += 1
            else:
                # i-(a+0.5) ~ i+(a+0.5)
                # i: 整数、a: ＋整数　なので +0.5 は切り捨てられる。
                #　影響範囲は、 i-a ~ i+a
                for p in range(i-a,i+a+1):
                    #print("p:",p)
                    if p >=0 and p < N:
                        B[p] += 1
                #print(B)
        if k < K-1:
            A = B
        else:
          break
    return B




if __name__ == '__main__':
    N,K = LI()[:]
    A = LI()
    B = main(N,K,A)
    print(B)


### FIXED CODE ###

import sys
import numpy as np
from numba import njit
 
readline = sys.stdin.readline
 
@njit('i8,i8,i8[::1]',cache=True)
def loop(n,k,a):
    for j in range(k):
        b = np.zeros(n+1, dtype=np.int64)
        for i in range(n):
            b[max(i-a[i], 0)] += 1
            b[min(i+a[i]+1, n)] -= 1
        a = np.cumsum(b)[:-1]
        if np.all(a==n):
            return(a)
            break
    else:
        return(a)
 
 
n, k = map(int, readline().split())
a = np.array(readline().split(), dtype=np.int64)
 
ans = loop(n,k,a)
print(*ans)
import sys
sys.setrecursionlimit(10000000)
import heapq
import math

def main():
    N, K = map(int, input().split())
    A = [int(c) for c in input().split()]
    F = [int(c) for c in input().split()]
    
    A.sort()
    F.sort(reverse=True)

    num = 0
    sum_ = A * F
    left = 0
    right = 10 ** 12
    while(num < 50):
        number = 0
        mid = (left + right) // 2
        # print(mid)
        for i in range(len(A)):
            if sum_[i] <= mid:
                continue
            else:
                number += math.ceil((sum_[i] - mid) / F[i])
            # print(number)
        if number > K:
            # 最大値をmidより小さくできない -> 最大値はもっとでかい
            left = mid + 1
        else:
            right = mid
        num += 1
    print(mid)
                

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
sys.setrecursionlimit(10000000)
import heapq
import math
 
def main():
    N, K = map(int, input().split())
    A = [int(c) for c in input().split()]
    F = [int(c) for c in input().split()]
    
    A.sort()
    F.sort(reverse=True)
 
    num = 0
    sum_ = []
    for i in range(N):
      sum_.append(A[i] * F[i])
    left = 0
    right = 10 ** 12
    while(num < 90):
        number = 0
        mid = (left + right) // 2
        # print(mid)
        for i in range(len(A)):
            if sum_[i] <= mid:
                continue
            else:
                number += math.ceil((sum_[i] - mid) / F[i])
            # print(number)
        if number > K:
            # 最大値をmidより小さくできない -> 最大値はもっとでかい
            left = mid + 1
        else:
            right = mid
        num += 1
    print(mid)
                
        
 
 
 
if __name__ == '__main__':
    main()
x,y,a,b,c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

p =sorted(p)[::-1][:x][::-1]
q =sorted(q)[::-1][:y][::-1]
r =sorted(r)[::-1][:x+y]

pp = 0
qq = 0
pf = True
qf = True
for rr in r:
    lll = False
    if pf == True and qf == True:
        if p[pp]<rr and q[qq]<rr:
            lll = True
            if p[pp]<q[qq] and pf == True:
                p[pp] = rr
                pp += 1
                if pp == x:
                    pf = False
            elif qf == True:
                q[qq] = rr
                qq +=1
                if qq == y:
                    qf = False
    if pf == True and lll == False:
        if p[pp]<rr:
            lll = True
            if pf == True:
               p[pp] = rr
               pp += 1
               if pp == x:
                  pf = False
    if pf == True and lll == False:
        lll = True
        if q[qq]<rr:
            if qf == True:
                q[qq] = rr
                qq +=1
                if qq == y:
                    qf = False
print(sum(p)+sum(q))


### FIXED CODE ###

x,y,a,b,c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

p =sorted(p)[::-1][:x][::-1]
q =sorted(q)[::-1][:y][::-1]
r =sorted(r)[::-1][:x+y]

pp = 0
qq = 0
pf = True
qf = True
for rr in r:
    lll = False
    if pf == True and qf == True:
        if p[pp]<rr and q[qq]<rr:
            lll = True
            if p[pp]<q[qq] and pf == True:
                p[pp] = rr
                pp += 1
                if pp == x:
                    pf = False
            elif qf == True:
                q[qq] = rr
                qq +=1
                if qq == y:
                    qf = False
    if pf == True and lll == False:
        if p[pp]<rr:
            lll = True
            if pf == True:
               p[pp] = rr
               pp += 1
               if pp == x:
                  pf = False
    if qf == True and lll == False:
        if q[qq]<rr:
            lll = True
            if qf == True:
                q[qq] = rr
                qq +=1
                if qq == y:
                    qf = False

print(sum(p)+sum(q))
A,B= map(int, input().split())

OnlyA = A+(A-1)

OnlyB = B+(B-1)

AaddB = A + B

print(max[OnlyA,OnlyB,AaddB])

### FIXED CODE ###

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

OnlyA = A+(A-1)

OnlyB = B+(B-1)

AaddB = A + B

print(max([OnlyA,OnlyB,AaddB]))
N,M = map(int, raw_input().split())
hist = {}
for i in range(N):
  a,b = map(int, raw_input().split())
  if a in hist:
    hist[a] += 1
  else:
    hist[a] = 1
  if b in hist:
    hist[b] += 1
  else:
    hist[b] = 1

for v in hist.values():
  if v%2 == 1:
    print 'NO'
    break
else : print 'YES'

### FIXED CODE ###

N,M = map(int, raw_input().split())
hist = [0 for i in range(N)]
for i in range(M):
  a,b = map(int, raw_input().split())
  hist[a-1] += 1
  hist[b-1] += 1
for v in hist:
  if v%2 == 1:
    print 'NO'
    break
else : print 'YES'
s = input()
if s == 'ABC':
  print('ARC')
else:
  pritn('ABC')

### FIXED CODE ###

s = input()
if s == 'ABC':
  print('ARC')
else:
  print('ABC')
n = int(input())
a = list(range(1, n+1))
print(sum(list(range(1, n))))

### FIXED CODE ###

n = int(input())
print(n * (n-1) // 2)
N, Q = input().split(" ")
N, Q = int(N), int(Q)
S = input()
s = S.replace("AC", "__")
counts = range(Q)
for i in range(Q):
    li, ri = [int(lr) for lr in input().split(" ")]
    counts[i] = s[li-1, ri].count("__")

print(max(counts))


### FIXED CODE ###

N, Q = [int(nq) for nq in input().split(" ")]
S = input()
t = [0] * (N)
for i in range(1, N):
  t[i] = t[i-1] + (1 if (S[i-1] == "A" and S[i] == "C") else 0)
for _ in " " * Q:
  l, r = [int(lr) for lr in input().split(" ")]
  print(t[r-1]-t[l-1])