Harryxun/stf_run huggingface dataset:
N, M = map(int, input().split())
list = []
for i in range(M):
    L, R = map(int, input().split())
    list.append([L,R])
anslist = [list[0][0],list[0][1]]
arukadouka = True
if M = 1:
    arukadouka = False
cnt = 0
for i in range(1,M):
    if arukadouka == True:
        if anslist[0] > list[i][1]:
            arukadouka = False
        elif anslist[1] < list[i][0]:
            arukadouka = False
        else:
            if (anslist[0]<=list[i][0]) and (anslist[1]<=list[i][1]):
                anslist[0] = list[i][0]
            elif (anslist[0]<=list[i][0]) and (anslist[1]>=list[i][1]):
                anslist[0] = list[i][0]
                anslist[1] = list[i][1]
            elif (anslist[0]>=list[i][0]) and (anslist[1]<=list[i][1]):
                pass
            elif (anslist[0]>=list[i][0]) and (anslist[1]>=list[i][1]):
                anslist[1] = list[i][1]
        cnt += 1
print(anslist[1]-anslist[0]+1)

### FIXED CODE ###

N, M = map(int, input().split())
list = []
for i in range(M):
    L, R = map(int, input().split())
    list.append([L,R])
anslist = [list[0][0],list[0][1]]
arukadouka = True
cnt = 0
for i in range(1,M):
    if arukadouka == True:
        if anslist[0] > list[i][1]:
            arukadouka = False
        elif anslist[1] < list[i][0]:
            arukadouka = False
        elif list[i][0] == list[i][1]:
            anslist[0] = list[i][0]
            anslist[1] = list[i][1]
        else:
            if (anslist[0]<=list[i][0]) and (anslist[1]<=list[i][1]):
                anslist[0] = list[i][0]
            elif (anslist[0]<=list[i][0]) and (anslist[1]>=list[i][1]):
                anslist[0] = list[i][0]
                anslist[1] = list[i][1]
            elif (anslist[0]>=list[i][0]) and (anslist[1]<=list[i][1]):
                pass
            elif (anslist[0]>=list[i][0]) and (anslist[1]>=list[i][1]):
                anslist[1] = list[i][1]
        cnt += 1
if arukadouka == True:
    ans = anslist[1]-anslist[0]+1
else:
    ans = 0
print(ans)
a,b = ((x) for x in input().split())
int(c) = int(a) - int(b)
if c > '0':
    print ( c )
else:
    print('0')

### FIXED CODE ###

X, t = map(int, input().split())
x = X - t
 
if x > 0:
    print(x)
else:
    print(0)
n=int(input())
dp=input().split()
m=int(input())
tp=input().split()
d=dict()

ans="YES"

for di in dp:
    if di in d:
        d[di]+=1
    else:
        d[di]=1

for ti in tp:
    if ti not in dp or d[ti]==0:
        ans="NO"
        break
    else:
        d[ti]-=1
print(ans)

### FIXED CODE ###

x=input()
print(x[:-8])
import math 
n = int(input())
print(math.ceil(n/ 1000) * 1000 - n)

### FIXED CODE ###

n, k = map(int, input().split())
l = sorted(list(map(int, input().split())))

ans = 0
for i in range(k):
    ans += l[i]

print(ans)
a, b, c = [input(i) for i in input().split()]

total = 0
for d in range(a, b + 1):
    if c % d == 0:
        total += 1

print(total)

### FIXED CODE ###

a, b, c = [int(i) for i in input().split()]

total = 0
for d in range(a, b + 1):
    if c % d == 0:
        total += 1

print(total)
n = int(input())
p = [int(input()) for _ in range(n)]
print(sum(p) - int((max(p)/2)))

### FIXED CODE ###

d = int(input())
print('Christmas'+(' '+'Eve')*(25-d))
kazu = int(input())
isi = input()
isilst = []
count=0
for i in range(kazu-1):
    if isi[i] =="#" and isi[i + 1] == ".":
        count += 1
print(count)

### FIXED CODE ###

# coding: utf-8
# Your code here!
kazu = input().split()
for i in range(len(kazu)):
    kazu[i] = int(kazu[i])
if kazu[0] < kazu[1]:
    if kazu[0] < kazu[2] and kazu[1] > kazu[2]:
        print("Yes")
    else:
        print("No")
elif kazu[0] > kazu[1]:
    if kazu[0] > kazu[2] and kazu[1] < kazu[2]:
        print("Yes")
    else:
        print("No")
inputlist = map(int, re.split(' ', raw_input()))
print inputlist
#print(gcd(x, y))

### FIXED CODE ###

import re

def gcd(x, y):
    if x == y:
        return x
    if x < y and y % x == 0:
        return x
    if x > y and x % y == 0:
        return y
    if x <= y:
        m = y % x
        return gcd(x, m)
    if x >= y:
        m = x % y
        return gcd(y, m)

    l = list(range(1, int(min(x, y) / 2) + 1))
    l.reverse()
    r = 1
    for i in l:
        if x % i == 0 and y % i == 0:
            return i
    return 1
 
x, y = map(int, re.split(' ', raw_input()))
print(gcd(x, y))
n=int(input())
k=int(input())
c=0
while n:
  c+=1
  n=n//k
print(c)

### FIXED CODE ###

n,k=map(int,input().split())
c=0
while n:
  c+=1
  n=n//k
print(c)
a,op,c = map(str,input(),split())
if op == "+":
	print(int(a) + int(b))
else:
	print(int(a) - int(b))

### FIXED CODE ###

a,op,b = map(str,input().split())
if op == "+":
	print(int(a) + int(b))
else:
	print(int(a) - int(b))
# = map(int, input().split())
# = list(map(int, input().split()))
n, x, y = map(int, input().split())
x -= 1
y -= 1
ans = ()
for i in range(n):
    for j in range(i+1, n):
        a = min([j-i, abs(x-i)+abs(y-j)+1, abs(y-i)+abs(x-j)+1]) 
        ans.append(a)
ans = (str(l) for l in ans)

for k in range(1, n):
    finalans=ans.count(str(k))
    print(finalans)


### FIXED CODE ###

# = map(int, input().split())
# = list(map(int, input().split()))
n, x, y = map(int, input().split())
x -= 1
y -= 1
ans = [0] * n
for i in range(n):
    for j in range(i+1, n):
        dist = min([j-i, abs(x-i)+abs(y-j)+1, abs(y-i)+abs(x-j)+1]) 
        ans[dist] += 1
for k in range(1, n):
    print(ans[k])
n,k = map(int,input().split())
li = list(map(int,input().split()))

start = 0
atesaki = 0
atesaki_li = [0]
target = atesaki
last = -1
for i in range(k):
    atesaki = li[start]-1
    start = atesaki
    if atesaki in atesaki_li:
        last = atesaki
        break
    else:
        atesaki_li.append(atesaki)
#print(last,atesaki_li)
#[0, 2, 3]

ma = len(atesaki_li)
if k+1<=ma:
    print(ma[k])
else:
    fi = atesaki_li.index(last)
    kurikaeshi = ma - fi
    ama = (k+1-ma)%kurikaeshi
    new_li = atesaki_li[fi:]
    #print(fi,kurikaeshi,ama,atesaki_li)
    #print(atesaki_li,last,kurikaeshi,ama)
    #print(new_li)
    print(new_li[ama-1]+1)


### FIXED CODE ###

n,k = map(int,input().split())
li = [0]+list(map(int,input().split()))

memo = [-1]*(n+1)
start = 1
syuuki = 0
haji = 0

for i in range(k):
    if memo[start] != -1:
        syuuki = i - memo[start]
        haji = memo[start]
        break
    memo[start] = i
    start = li[start]
else:
    print(start)
    exit()

#print(syuuki,haji)
k-=haji
k%=syuuki
k+=haji

start = 1
for kk in range(k):
    start = li[start]
print(start)
s=input()
if len(s)<26:
    al=[chr(ord('a') + i) for i in range(26)]
    for i in al:
        if not(i in s):
            print(s+i)
            exit()
if s=="zyxwvutsrqponmlkjihgfedcba":
    print(-1)
    exit()
for i in range(26):
    if s[i]>s[i+1]:
        k=i-1
        break
a="z"
for i in range(k,26):
    if s[k]<s[i]:
        a=min(a,s[i])
print(s[:k]+a)

### FIXED CODE ###

s=input()
if len(s)<26:
    al=[chr(ord('a') + i) for i in range(26)]
    for i in al:
        if not(i in s):
            print(s+i)
            exit()
if s=="zyxwvutsrqponmlkjihgfedcba":
    print(-1)
    exit()
a=[]
for i in range(25,-1,-1):
    for j in range(24-(25-i),-1,-1):
        if s[j]<s[i]:
            a.append(s[:j]+s[i])
print(min(a))
a,b,n=map(int,input().split())
c=max(0,a//b)
d=min(b,n)
def floor(x):
    return int((a*x)/b)-a*(int(x/b))
if n<=b:
    print(floor(n))
else:
    if b<a:
        print(floor(b-1))
    elif b=a:
        print(floor(b))
    else:
        e=max(b-1,a//b)
        print(floor(e))



### FIXED CODE ###

a,b,n=map(int,input().split())
c=max(0,a//b)
d=min(b,n)
def floor(x):
    return int((a*x)/b)-a*(int(x/b))
if n<b:
    print(floor(n))
elif n==b:
    print(floor(b-1))
else:
    if b<a:
        print(floor(b-1))
    elif b==a:
        print(floor(b))
    else:
        e=max(b-1,a//b)
        print(floor(e))
isstr=input()
n,m = [int(i) for i in isstr.split(' ')]
l=[0]*m
r=[0]*m
for i in range(m):
    l[i],r[i]=[int(i) for i in input().split(' ')]
a=[0]*n
for i in range(m):
    for j in range(l[i],r[i]+1):
        a[j+1]=1
print(sum(a))


### FIXED CODE ###

isstr=input()
n,m = [int(i) for i in isstr.split(' ')]
l=[0]*m
r=[0]*m
for i in range(m):
    l[i],r[i]=[int(i)-1 for i in input().split(' ')]
x=min(r)-max(l)+1
x=x if x>0 else 0
print(x)
def combination(n,r):
    n_=1
    r_=1
    for i in range(n,n-r,-1):
        n_*=i
    for i in range(1,r+1):
        r_*=i

    return n_//(n_r*r_)

def main():
    N=int(input())
    A=list(map(int,input().split()))

    ball_dic={}

    for a in A:
        if a in ball_dic.keys():
            ball_dic[a]+=1
        else:
            ball_dic[a]=1


    all_patern=0

    combination_dic={}

    for key in ball_dic.keys():
        if ball_dic[key]>=2:
            if (ball_dic[key] in combination_dic.keys()) is False:
                combination_dic[ball_dic[key]] = combination(ball_dic[key], 2)
            all_patern += combination_dic[ball_dic[key]]

    for a in A:
        if ball_dic[a]-1<2:
            if ball_dic[a] in combination_dic.keys():
                res=all_patern-combination_dic[ball_dic[a]]
            else:
                res=all_patern
        else:
            com=combination_dic[ball_dic[a]]
            res=all_patern-com+(com*(ball_dic[a]-2)//ball_dic[a])

        print(res)

if __name__=="__main__":
    main()

### FIXED CODE ###

def combination(n,r):
    n_=1
    r_=1
    for i in range(n,n-r,-1):
        n_*=i
    for i in range(1,r+1):
        r_*=i

    return n_//r_

def main():
    N=int(input())
    A=list(map(int,input().split()))

    ball_dic={}

    for a in A:
        if a in ball_dic.keys():
            ball_dic[a]+=1
        else:
            ball_dic[a]=1


    all_patern=0

    combination_dic={}

    for key in ball_dic.keys():
        if ball_dic[key]>=2:
            if (ball_dic[key] in combination_dic.keys()) is False:
                combination_dic[ball_dic[key]] = combination(ball_dic[key], 2)
            all_patern += combination_dic[ball_dic[key]]

    for a in A:
        if ball_dic[a]-1<2:
            if ball_dic[a] in combination_dic.keys():
                res=all_patern-combination_dic[ball_dic[a]]
            else:
                res=all_patern
        else:
            com=combination_dic[ball_dic[a]]
            res=all_patern-com+(com*(ball_dic[a]-2)//ball_dic[a])

        print(res)

if __name__=="__main__":
    main()
o,f,i=998244353,[1],1
while i<o/399:f+=f[-1]*i%o;i+=1
c=lambda n,k:f[n]*pow(f[n-k],o-2,o)*pow(f[k],o-2,o)
n,m=map(int,input().split())
w,u=3*m,n-1
a=c(w+u,u)-n*c(n+m-2,u)
if u>m:
 for i in range(m+1,min(w,n)+1):
  if w-i+1&1:a-=c(n,i)*c((w-i)//2+u,u) 
print(a%o)

### FIXED CODE ###

mod = 998244353
rng = 2500100
fctr = [1]
finv = [1]
for i in range(1,rng):
  fctr.append(fctr[-1]*i%mod)
def inv(x):
  return pow(x,mod-2,mod)
def cmb(n,k):
  if n<0 or k<0:
    return 0
  else:
    return fctr[n]*inv(fctr[n-k])*inv(fctr[k])%mod

n,m = map(int,input().split())
ans = cmb(n+3*m-1,n-1)
ans = (ans-n*cmb(n+m-2,n-1))%mod
if n>m+1:
  for i in range(m+1,min(3*m,n)+1):
    if (3*m-i)%2 == 1:
      continue
    x = (3*m-i)//2
    ans = (ans-cmb(n,i)*cmb(x+n-1,n-1))%mod
print(ans)
X = set()
for x in input():
  X.add(x.encode("sjis")[0])
X = sorted(X)
codeA = "a".encode("sjis")[0]
codes = [bytes(codeA + i).decode("sjis") for i in range(26)]
codes.append("None")

print(codes(sum([1 for i, x in enumerate(X) if x == codes[i]])))


### FIXED CODE ###

X = set()
for x in input():
  X.add(x)
X = sorted(X)
c = bytes(["a".encode("sjis")[0] + sum([1 for i, x in enumerate(X) if x.encode("sjis")[0] == "a".encode("sjis")[0] + i])]).decode("sjis")

if c.encode("sjis")[0] > "z".encode("sjis")[0]:
  c = "None"

print(c)
n,m=map(int,input().split())
py=[]
for i in range(m):
    py.append(list(map(int,input().split()))+[i+1])
py.sort()
number_list=[]
number_list.append([str(0)]*(6-(len(list(str(py[0][0])))))+list(str(py[0][0]))+[str(0)]*(6-(len(list(str(1)))))+list(str(1))+[str(py[0][-1])])
k=2
for j in range(1,m):
    if py[j][0]==py[j-1][0]:
        number_list.append([str(0)]*(6-(len(list(str(py[j][0])))))+list(str(py[j][0]))+[str(0)]*(6-(len(list(str(k)))))+list(str(k))+[str(py[j][-1])])    
        k+=1
    else:
        k=1
        number_list.append([str(0)]*(6-(len(list(str(py[j][0])))))+list(str(py[j][0]))+[str(0)]*(6-(len(list(str(k)))))+list(str(k))+[str(py[j][-1])])
        k+=1
number_list_sort=sorted(number_list,key=lambda x:x[-1])
for l in range(m):
    print(''.join(number_list_sort[l][:-1])

### FIXED CODE ###

n,m=map(int,input().split())
py1=[]
for i in range(m):
    py1.append(list(map(int,input().split()))+[i+1])
py=sorted(py1)

number_list=[]
number_list.append([str(0)]*(6-(len(list(str(py[0][0])))))+list(str(py[0][0]))+[str(0)]*(6-(len(list(str(1)))))+list(str(1))+[str(py[0][-1])])
k=2
for j in range(1,m):
    if py[j][0]==py[j-1][0]:
        number_list.append([str(0)]*(6-(len(list(str(py[j][0])))))+list(str(py[j][0]))+[str(0)]*(6-(len(list(str(k)))))+list(str(k))+[str((py[j][-1]))])    
        k+=1
    else:
        k=1
        number_list.append([str(0)]*(6-(len(list(str(py[j][0])))))+list(str(py[j][0]))+[str(0)]*(6-(len(list(str(k)))))+list(str(k))+[str(py[j][-1])])
        k+=1
     
number_list_sort=sorted(number_list,key=lambda x:int(x[-1]))
for l in range(m):
    print(''.join(number_list_sort[l][:-1]))
import math

n = int(input())
li_t = list()

for _ in range(n):
    li_t.append(int(input()))

# a * b = 最小公倍数 * 最大公約数

def lcm(a, b):
    return (a * b) // math.gcd(a, b)

work = li_t.pop(0)

for t in li_t:
    work = lcm(work, t)

print(work)


### FIXED CODE ###

from fractions import gcd


n = int(input())
li_t = list()

for _ in range(n):
    li_t.append(int(input()))

# a * b = 最小公倍数 * 最大公約数


def lcm(a, b):
    return (a * b) // gcd(a, b)

work = 1

for t in li_t:
    work = lcm(work, t)

print(work)
N = int(input())
l = [int(x) for x in input().split()]

if 0 in l:
    ans = 0
else:
    n = min(N,len(l))
    ans = 1
    for i in l[:n]:
        ans *= i
        if ans > 10**18:
            ans = -1
            bre
print(ans)

### FIXED CODE ###

N = int(input())
l = [int(x) for x in input().split()]

if 0 in l:
    ans = 0
else:
    n = min(N,len(l))
    ans = 1
    for i in l[:n]:
        ans *= i
        if ans > 10**18:
            ans = -1
            break
print(ans)
def calc_gcd(a, b):
    import math
    return math.gcd(a, b)


if __name__ == '__main__':
    # ??????????????¬?????¨
    # start_time = datetime.now()
    # print('>>> {0}'.format(start_time))

    # ???????????\???
    data = [int(x) for x in input().split(' ')]

    # ?¨?????????????
    result = calc_gcd(data[0], data[1])

    # ???????????¨???
    print('{0}'.format(result))

### FIXED CODE ###

def calc_gcd(x, y):
    """
    math.gcd()????????¨??§????????????python3.5??\??????AOJ???python?????????????????????3.4????????§?????¨??§?????????
    """
    if y == 0:
        return x
    else:
        return calc_gcd(y, x % y)


if __name__ == '__main__':
    data = [int(x) for x in input().split(' ')]
    result = calc_gcd(data[0], data[1])
    print('{0}'.format(result))
SHEEP = True
WOLF = False


def print_tree(tree):
    print(''.join(['S' if e else 'W' for e in tree]))


def calc_next_animal(tree, cur_pos):
    if answer[cur_pos]:
        if tree[cur_pos] == SHEEP:
            return tree[cur_pos - 1]
        else:
            return not tree[cur_pos - 1]
    else:
        if tree[cur_pos] == SHEEP:
            return not tree[cur_pos - 1]
        else:
            return tree[cur_pos - 1]


def calc_prev_animal(tree, cur_pos):
    if answer[cur_pos]:
        if tree[cur_pos] == SHEEP:
            return tree[cur_pos + 1]
        else:
            return not tree[cur_pos + 1]
    else:
        if tree[cur_pos] == SHEEP:
            return not tree[cur_pos + 1]
        else:
            return tree[cur_pos + 1]


def wfs(tree, cur_pos, N):
    tree[cur_pos + 1] = calc_next_animal(tree, cur_pos)
    cur_pos += 1
    if cur_pos == N - 1:
        return tree[0] == calc_next_animal(tree, cur_pos) and tree[cur_pos] == calc_prev_animal(tree, 0)
    else:
        return wfs(tree, cur_pos, N)


if __name__ == '__main__':
    N = int(input())
    answer = [True if i == 'o' else False for i in input().rstrip()]
    aa = [[WOLF, WOLF]
        , [WOLF, SHEEP]
        , [SHEEP, SHEEP]
        , [SHEEP, WOLF]]
    super_list = [0] * int(2E5)
    for a in aa:
        super_list[:2] = a
        if wfs(super_list, 1, N):
            print_tree(super_list[:N])
            break
    else:
        print(-1)

### FIXED CODE ###

import sys

sys.setrecursionlimit(int(2E5))

SHEEP = True
WOLF = False


def print_tree(tree):
    print(''.join(['S' if e else 'W' for e in tree]))


def calc_next_animal(tree, cur_pos):
    if answer[cur_pos]:
        if tree[cur_pos] == SHEEP:
            return tree[cur_pos - 1]
        else:
            return not tree[cur_pos - 1]
    else:
        if tree[cur_pos] == SHEEP:
            return not tree[cur_pos - 1]
        else:
            return tree[cur_pos - 1]


def calc_prev_animal(tree, cur_pos):
    if answer[cur_pos]:
        if tree[cur_pos] == SHEEP:
            return tree[cur_pos + 1]
        else:
            return not tree[cur_pos + 1]
    else:
        if tree[cur_pos] == SHEEP:
            return not tree[cur_pos + 1]
        else:
            return tree[cur_pos + 1]


def wfs(tree, cur_pos, N):
    tree[cur_pos + 1] = calc_next_animal(tree, cur_pos)
    cur_pos += 1
    if cur_pos == N - 1:
        return tree[0] == calc_next_animal(tree, cur_pos) and tree[cur_pos] == calc_prev_animal(tree, 0)
    else:
        return wfs(tree, cur_pos, N)


if __name__ == '__main__':
    N = int(input())
    answer = [True if i == 'o' else False for i in input().rstrip()]
    aa = [[WOLF, WOLF]
        , [WOLF, SHEEP]
        , [SHEEP, SHEEP]
        , [SHEEP, WOLF]]
    super_list = [0] * int(2E5)
    for a in aa:
        super_list[:2] = a
        if wfs(super_list, 1, N):
            print_tree(super_list[:N])
            break
    else:
        print(-1)
A, B, M = map(int, input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
ans = 10000000
for _ in range(M):
    x, y, c = map(int, input().split())
    ans = min(ans, a[x - 1] + a[y - 1] - c)
a.sort()
b.sort()
print(min(ans, a[0] + b[0]))


### FIXED CODE ###

abm = [int(n) for n in input().split()]

a = abm[0]
b = abm[1]
m = abm[2]
am, bm = 1000000, 1000000
al = [int(n) for n in input().split()]
bl = [int(n) for n in input().split()]
for i in al:
    if am > i:
        am = i
for i in bl:
    if bm > i:
        bm = i
ans = am + bm

for i in range(m):
    x, y, c = map(int, input().split())
    x = x - 1
    y = y - 1
    cur = al[x] + bl[y] - c
    if cur < ans:
        ans = cur

print(ans)
n = int(input())
a = list(map(int, input().split()))
totoal = 1
for i in a:
  total = total * a
  if total > 10**18:
    print("-1")

print(total)


### FIXED CODE ###

n = int(input())
l = list(map(int, input().split()))
if 0 in l:
  print(0)
  exit()
ans = 1
for i in range(n):
  ans *= l[i]
  if ans > 10**18:
    ans = -1
    break
print(ans)
n=int(input())
a=list(map(int,input()split()))
b=list(map(int,input()split()))
x=sum(a)
for i in range(n):
  if a[i]>=b[i]:
    a[i]-=b[i]
  else:
    a[i]=0
    a[i+1]-=b[i]-a[i]
print(x-sum(a))

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
x=sum(b)
for i in range(n):
  s=a[i]+a[i+1]
  t=b[i]
  x-=max(0,t-s)
  a[i+1]-=max(0,b[i]-a[i])
  a[i+1]=max(a[i+1],0)
print(x)
A, B, C, D = map(int, input().split())

for op1 in '+-':
    for op2 in '+-':
        for op3 in '+-':
            if eval(A+op1+B+op2+C+op3+D) == 7:
                print(A+op1+B+op2+C+op3+D+'=7')
                exit()

### FIXED CODE ###

A, B, C, D = map(str, input())

for op1 in '+-':
    for op2 in '+-':
        for op3 in '+-':
            if eval(A+op1+B+op2+C+op3+D) == 7:
                print(A+op1+B+op2+C+op3+D+'=7')
                exit()
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
s = []

for i in h:
    s.append(abs(a-t+i*0.006))

print(s.index(min(s))+1)

### FIXED CODE ###

X,Y = map(int,input().split())
print(X+Y//2)
N, Q = map(int, input().split(" "))     # マス数、呪文回数
s = input()   # マス文字
g_list = []
for i in range(len(s)):
    g_list.append([s[i], 1])
s_list = {}
for i in range(len(s)):
    s_list.setdefault(s[i], []).append(i)
sum = len(s)

# 動かす
def move(d, str):
    i = g_list[str][1]
    g_list[str][1] = 0
    if d == "L":
        if str == 0:
            sum -= i
            return
        g_list[str-1][1] += i
    else:
        if str == N-1:
            sum -= i
            return
        g_list[str+1][1] += i
    # print(g_list)


for i in range(Q):
    t, d = list(input().split(" "))
    for str in s_list[t]:
        print(str)
        if g_list[str][0] == t:
            move(d, str)
        else:
            continue



### FIXED CODE ###

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

if a == b and c == a:
    print("Yes")
else:
    print("No")
a,b = map[int,input().split()]
if (a*b)%2 == 0:
  print("Even")
else:
  print("Odd")

### FIXED CODE ###

a,b = map(int,input().split())
if (a*b)%2 == 0:
	print("Even")
elif (a*b)%2 == 1:
	print("Odd")
n = int(input())
a = [input() for _ in range(n)]

if max(a)%2 == 0:
    print("second")
else:
    print("first")

### FIXED CODE ###

n = int(input())

for _ in range(n):
    if int(input())%2 == 1:
        print("first")
        exit()
else:
    print("second")
N = int(input())
S = input()

sum_W = [0] * (N+1)
sum_E = [0] * (N+1)

for i in range(N):
    if S[i] == "W":
        sum_W[i+1] = sum_W[i] + 1
        sum_E[i+1] = sum_E[i]
    else:
        sum_W[i+1] = sum_W[i]
        sum_E[i+1] = sum_E[i] + 1

answers = []
for i in range(N):
    answer = sum_W[i] + (sum_E[N+1] - sum_E[i+1])
    answers.append(answer)

print(min(answers))

### FIXED CODE ###

N=int(input())
S=input()
cnt=S.count("E")
m=cnt
for i in S:
    if i=="E":
        cnt-=1
    else:
        cnt+=1
    m=min(m,cnt)
print(m)
H,N=map(int,input().split())
A=[map(int,input().split())]
a=sum(A)
if H<=a:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

H,N=map(int,input().split())
A=list(map(int,input().split()))
a=sum(A)
if H<=a:
  print("Yes")
else:
  print("No")
n = int(input())
x,y = map(int,input().split())
print(1 / (1 / x + 1 / y))

### FIXED CODE ###

n = int(input())
def f(x):
    return 1 / x
List = list(map(int, input().split()))
List2 = [x for x in map(f, List)]
s = sum(List2)
print(1 / s)
from functools import reduce
from itertools import combinations
N = int(input())
S = {"M": [], "A": [], "R": [], "C": [], "H": []}
for _ in range(N):
    i = input()
    head = i[0]
    if head == "M":
        S["M"].append(i)
    elif head == "A":
        S["A"].append(i)
    elif head == "R":
        S["R"].append(i)
    elif head == "C":
        S["C"].append(i)
    elif head == "H":
        S["H"].append(i)
result = [len(S[head]) for head in list("MARCH") if len(S[head]) != 0]

ans = sum([reduce(lambda x, y: x * y, list(combinations(result, 3))[i])
           for i in range(len(result))])
print(ans)


### FIXED CODE ###

from functools import reduce
from itertools import combinations
N = int(input())
S = {"M": [], "A": [], "R": [], "C": [], "H": []}
for _ in range(N):
    i = input()
    head = i[0]
    if head == "M":
        S["M"].append(i)
    elif head == "A":
        S["A"].append(i)
    elif head == "R":
        S["R"].append(i)
    elif head == "C":
        S["C"].append(i)
    elif head == "H":
        S["H"].append(i)
counter = [len(S[head]) for head in list("MARCH") if len(S[head]) != 0]
combs = list(combinations(counter, 3))
ans = sum([reduce(lambda x, y: x * y, e) for e in combs])
print(ans)