peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
N, K = map(int, input().split())
d = []
A = []

for _ in range(K):
    d.append(int(input()))
    A.append(list(map(int, input().split())))

cnt = {}
for i in range(N):
    cnt.setdefault(str(i + 1), 0)

for Ai in A:
    for Aij in Ai:
        cnt[str(Aij)] += 1

ans = 0
for key, val in cnt.items():
    if val == 0: ans += 1

print(ans)
# Judge status: Accepted

n = int(input())
a = list(map(int, input().split()))

MOD = 10 ** 9 + 7

sum = sum(a) % MOD
ans = 0

for i in range(len(a)):
    sum -= a[i]
    sum %= MOD
    ans += a[i] * sum
    ans %= MOD

print(ans)
# Judge status: Wrong Answer
n=int(input())
x = [int(input()) for i in range(n)]
ans=1
visited=[False]*n
now=0
while(1):
  visited[now]=True # 今のところをいったことにする
  next=x[now]-1 # 次の行き先
  if visited[next]:
    print(-1)
    break
  if x[next]==2: # 次が2やったら終わる
    print(ans+1)
    break
  else:
    now=next
    ans+=1
# Judge status: Accepted
n=int(input())
a=[2,4,5,7,9]
x=n%10
if x in a:
  print("hon")
elif x==3:
  print("bon")
else:
  print("pon")
# Judge status: Accepted
n = input()

if n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
import sys
from collections import Counter

n = int(input())
arr = list(map(int, input().split()))

c = list(Counter(arr).items())

c.sort()

if c[0][0] != 0 or c[0][1] != 1:
    print(0)
    sys.exit()

prev_k = 0
prev_v = 1
ans = 1
for k, v in c[1:]:
    if k - prev_k > 1 or prev_v * 2 < v:
        print(0)
        sys.exit()
    else:
        ans *= prev_v**v
        prev_k = k
        prev_v = v

print(ans % 998244353)
# Judge status: Accepted
N, A, B = map(int, input().split())
S = input()
a, b = 0, 0
for i in range(N):
    if S[i] == 'a':
        if a + b < A + B:
            print('Yes')
            a += 1
        else:
            print('No')
    elif S[i] == 'b':
        if a + b < A + B and b + 1 <= B:
            print('Yes')
            b += 1
        else:
            print('No')
    else:
        print('No')
# Judge status: Accepted
x = int(input())
a = x // 100
b = x % 100

a_is_month = 0 < a & a <= 12
b_is_month = 0 < b & b <= 12

if a_is_month:
    if b_is_month:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if b_is_month:
        print("YYMM")
    else:
        print("NA")
# Judge status: Accepted
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
p = abs(a-b)
if p > (v-w)*t:
    print("NO")
else:
    print("YES")
# Judge status: Accepted
a, b, c = map(int, input().split())

answer = False
for i in range(b+1):
    if (i*a)%b == c:
        answer=True
        break

if answer:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
i = int(input())
ans = 0
ans+=(i//500)*1000
ans+=((i%500)//5)*5
print(ans)
# Judge status: Accepted
N = int(input())
d = {}
a = []
for _ in range(N):
    A = int(input())
    a.append(A)
    if not(A in d):
        d[A] = 1
        continue
    elif d[A]==1:
        d[A] = 0
    else:
        d[A] = 1

ans = 0
for key in d:
    if d[key]==1:
        ans = ans + 1
print(ans)
# Judge status: Accepted
input()
cards = sorted([int(x) for x in input().split()], reverse = True)
alice_point = sum([x for i, x in enumerate(cards) if i % 2 == 0])
bob_point = sum([x for i, x in enumerate(cards) if i % 2 != 0])
print(alice_point - bob_point)
# Judge status: Wrong Answer
A, B, C = map(int, input().split())

t = sorted([A, B, C])
print(t[0] * 10 + t[1] + t[2])
# Judge status: Accepted
n = list(map(int, input().split()))

cnt = 0

while True:
    n.sort()
    a, b, c = n[0], n[1], n[2]
    if a == b == c:
        break
    if a + 2 <= c:
        a += 2
    else:
        a += 1
        b += 1
    cnt += 1
    n[0], n[1], n[2] = a, b, c
print(cnt)
# Judge status: Accepted
a, b, c = map(int, input().split())
print(min(a * b, b * c, c * a) if a % 2 != 0 and b % 2 != 0 and c % 2 != 0 else 0)
# Judge status: Wrong Answer
A, B, C = map(int, input().split())
count=0
for i in range(1, 1000):
    if B*i%A==0:
        count=1
    else:
        count=0
print("No" if count==0 else "Yes")
# Judge status: Accepted
x = int(input())
if x in [3,5,7]:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
n = int(input())
a = (n/3)**3
print(a)
# Judge status: Accepted
#28 B - Two Anagrams AC
s = list(input())
t = list(input())

s = sorted(s,reverse = False)
t = sorted(t,reverse = True)

s = ''.join(s)
t = ''.join(t)
if s < t:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
import math
N, M = [int(i) for i in input().split()]
r = pow(10, 9) + 7
L = abs(N - M)

if L >= 2:
    print(0)
else:
    E = 2*math.factorial(N)*math.factorial(M)
    print(int(E % r))
# Judge status: Accepted
N = int(input())
cnt = 0
for a in range(1, N):
    cnt += (N-1)//a
print(cnt)
# Judge status: Wrong Answer
k=int(input())
s=input()
n=len(s)
temp=""
for i in range(n):
    z=ord(s[i])+k
    if z>123:
        z-=27
    temp+=chr(z)
print(temp)
# Judge status: Accepted
n,m=map(int,input().split())
if n==1 and m==1:
  print(1)
elif n==1 or m==1:
  print(max(n,m)-2)
elif n==2 or m==2:
  print(0)
else:
  print(n*m-(n*2+m*2-4))
# Judge status: Accepted
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    NI = lambda : int(sys.stdin.readline())

    N = NI()

    d = [2] * (N+1)
    d[1] = 1
    for i in range(2,int(math.sqrt(N))+1):
        d[i*i] += 1
        j = i + 1
        while i * j <= N:
            d[i*j] += 2
            j += 1

    ans = 0
    for i in range(1,N+1):
        ans += i * d[i]

    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
N, M = map(int, input().split())
d = {}
for i in range(N):
    a, b = map(int, input().split())
    d[a] = b

d = sorted(d.items(), key=lambda x:x[0])
sum_ = 0
cnt = 0
for ab in d:
    if cnt + ab[1] >= M:
        sum_ += ab[0] * (M-cnt)
        break
    else:
        cnt += ab[1]
        sum_ += ab[0]*ab[1]
print(sum_)
# Judge status: Wrong Answer
n =int(input())

ans =[]
for i in range(n):
  if (i ** 0.5).is_integer() and i <= n:
    ans.append(i)
    
    
print(ans[-1])
# Judge status: Accepted
a,b=map(int,input().split())
A=str(a)*b
B=str(b)*a
print(min(A,B))
# Judge status: Wrong Answer
a, b = map(int, input().split())
s = [0] * 1000
for i in range(1000):
  s[i] = s[i - 1] + i
  if (s[i] == a): print(i)
  if (s[i - 1] - a == s[i] - b):
    print(s[i - 1] - a)
    break
# Judge status: Accepted
S=str(input())
N=753
Dmin=100000
for i in range(3,len(S)+1):
  X=int(S[i-3:i])
  D=abs(N-X)
  if D<Dmin:
    Dmin=D
print(Dmin)
# Judge status: Accepted
n, a, b = (int(x) for x in input().split())
result = 0

for num in range(1, n+1):
    res = sum(list(map(int, str(num))))
    if a <= res and res <= b:
        result += num

print(result)
# Judge status: Accepted
n, l = [int(x) for x in input().split()]
s_list = sorted([input() for _ in range(n)])
print("".join(s_list))
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 7)

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

N = int(input())

CNT = [0] * 10010
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            f = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if f > N:
                continue

            CNT[f] += 1

for i in range(1, N + 1):
    print(CNT[i])
# Judge status: Accepted
a,b =map(int,input().split())
for i in range(1,1000):
  c = int(i*(i+1)/2)
  d = int((i+1)*(i+2)/2)
  c = c-a
  d = d-b
  if c ==d:
    print(c)
    break
# Judge status: Wrong Answer
s = input()
if((s[0]==s[1] and s[2]==s[3] and s[0]!=s[2]) or (s[0]==s[2] and s[1] ==s[3] and s[0]!=s[1])
   and (s[0]==s[3] and s[1]==s[2] and s[0]!=s[1])):
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
K = int(input())
A,B = map(int,input().split())

if B - A >= K:
    print("OK")
elif A == B and B == K:
    print("OK")
elif K == 1:
    print("OK")
else:
    print("NG")
# Judge status: Accepted
h = list(map(int,input().split()))
a = list(map(int,input().split()))
b = list(map(int,input().split()))

price_min = min(a) + min(b)
for i in range(h[2]):
  c = list(map(int,input().split()))
  price = a[c[0]-1] + b[c[1]-1] - c[2]
  if price_min > price:
    price_min = price
    
print(price_min)
# Judge status: Accepted
def main():
    [n, k] = [int(x) for x in input().split()]
    arr = [int(x) for x in input().split()]

    for i in range(k, n):
        if arr[i-k] >= arr[i]:
            print('No')
        else:
            print('Yes')



main()
# Judge status: Accepted
print("YES" if int(input()) in [3, 5, 7] else "NO")
# Judge status: Accepted
s = input()
print(s.replace("?","D"))
# Judge status: Wrong Answer
N = int(input())
A = 100001*[0]

for a in map(int,input().split()):
  A[a-1]+=1
  A[a]+=1
  A[a+1]+=1

print(max(A))
# Judge status: Wrong Answer
n=int(input())
li = list(map(int,input().split()))
Q=0
for i in range(n-1):
  if li[i]<li[i+1]:
    Q+=1
print(n-Q)
# Judge status: Accepted
S,W=map(int,input().split())
print('un'*(S<=W) + 'safe')
# Judge status: Wrong Answer
K = int(input().rstrip())
n = 1
if K%7==0:
    L = 9 * K / 7
else:
    L = 9 * K
R = 10 ** n
s = set()
while R!=1:
    R = (10 * R) % L
    n += 1
    if R in s:
        print(-1)
        break
    else:
        s.add(R)
else:
    print(n)
# Judge status: Accepted
a, b = [int(i) for i in input().split()]

if a > b:
    print(str(b)*a)
else:
    print(str(a)*b)
# Judge status: Accepted
def f():
  n,m=map(int,input().split())
  for i in range(m//n+1)[::-1]:
    if m%i==0:return i
print(f())
# Judge status: Accepted
L, R = list(map(int,input().split(" ")))
l = L % 2019
r = R % 2019

ans = 2019

if R - L >= 2018 or L > R:
    print("0")
else:
    array = list(range(l,r+1))
    for i in array:
        for j in array:
            if i == j:
                continue
            temp = i * j % 2019
            if ans > temp:
                ans = temp
    print(ans)
# Judge status: Wrong Answer
S = input()
N = len(S)
ans = 0
for i in range(N):
    amari = int(S[i])
    amaretu = []
    for j in range(i+1,N):
        amari = (10*amari + int(S[j]))%2019
        if amari == 0:
            print(i,j)
            ans += 1
        else:
            if amari in amaretu:
                break
            else:
                amaretu.append(amari)
print(ans)
# Judge status: Accepted
w= input()
w_set =set(w)

for i in w_set:
    if w.count(i)%2==1:
        print("No")
        exit()
print("Yes")
# Judge status: Wrong Answer
import math
h, w = map(int, input().split())
if(h%2 == 0):
    print(int(w*(h//2)))
else:
    print(int(w*(h//2) + math.ceil(w/2)))
# Judge status: Wrong Answer
a = 3
b = 2
c = 1
if b - a == c - b:
  print('YES')
else:
  print('NO')
# Judge status: Accepted
w, a, b = map(int, input().split())

if a < b:
    if a + w > b:
        print(0)
    else:
        print(b - a - w)
else:
    if b + w > a:
        print(0)
    else:
        print(a - b - w)
# Judge status: Accepted
N = int(input())
P = 1
for n in range(N):
  P = (P*(n+1))%(pow(10,9)+7)
print(P)
# Judge status: Accepted
def solve():
    n = int(input())
    a= list(map(int,input().split()))
    a = sorted(a,reverse=True)
    res = sum(a[1:2*n:2])
    print(res)
if __name__=='__main__':
    solve()
# Judge status: Accepted

# 直感的に分かる貪欲（下から組を作る）だと思うんだけど、これでdiff1185は数字が高すぎじゃない? 

n = int(input())
nums = [int(input()) for _ in range(n)]

ans = 0
for idx, m in enumerate(nums):
    if m > 0:
        ans += m // 2
        # m -= (m // 2) * 2
        m = m & 1
    if m == 1 and idx != n-1 and nums[idx+1] >= 1:
        ans += 1
        m -= 1
        nums[idx+1] -= 1

print(ans)
# Judge status: Wrong Answer
s = sorted(list(input().split()))

s = "".join(s)

print(s)
# Judge status: Accepted
x, n = map(int, input().split())
p = set(map(int, input().split()))

ans = 0
diff = x
for i in range(1, 102):
  if i in p:
    continue
  tmp = abs(i - x)
  if tmp < diff:
    diff = tmp
    ans = i
print(ans)
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))
flg = 0

for i in range(N):
    if A[i] % 2 == 0:
        if A[i] % 3 != 0 and A[i] % 5 != 0 :
            flg = 1
            break
        elif A[i] % 3 == 0:
            flg = 0
        elif A[i] % 5 == 0:
            flg = 0
        else:
            flg = 1

if flg == 0:
    print('APPROVED')
else:
    print('DENIED')
# Judge status: Accepted
n = int(input())
L = [int(input()) for _ in range(5)]

ans = 5
if n%min(L) == 0:
    ans += n//min(L)-1
else:
    ans += n//min(L)+1-1
print(ans)
# Judge status: Wrong Answer
x = int(input())
p, q = divmod(x, 11)
print(p*2 if q < 7 else p*2+1)
# Judge status: Wrong Answer
n=int(input())
if(n%1000):
    print(n%1000)
# Judge status: Accepted
N = int(input())

def SumDigits(num):
    sum = 0
    while True:
        sum += num % 10
        num //= 10
        if num == 0:
            break
    return sum

infinity = float('inf')
min = infinity

for x in range(1, N):
    if SumDigits(x) + SumDigits(N - x) < min:
        min = SumDigits(x) + SumDigits(N - x)
print(min)
# Judge status: Wrong Answer
import sys
import math
m = input()
n= int(m)
a=math.floor(n/100)
n=n-a*100
b=math.floor(n/10)
n=n-b*10
if n==2 or 4 or 5 or 7 or 9:
    print("hon")
elif n==0 or 1 or 6 or 8:
    print("pon")
elif n==3:
    print("bon")
# Judge status: Accepted
import collections
N,K = map(int,input().split())
A = list(map(int,input().split()))
c = collections.Counter(A)
count = c.most_common()[::-1]

n = len(count)-K
cnt = 0
for i in range(n):
    cnt += count[i][1]
print(cnt)
# Judge status: Wrong Answer
if __name__ == '__main__':
    A, B, C, X, Y = map(int, input().split())
    min_cost = C*2*max(X, Y) 
    for c in range(-1, 2*pow(10, 5)+2, 2):
        a = X-c//2
        b = Y-c//2
        if a==100000 and b==100000:
            print("ans")
        if a>=0 and b>=0:
            cost = A*a+b*B+C*c
            min_cost = min(cost, min_cost)
    print(min_cost)
# Judge status: Accepted
from collections import deque
a = list(input())
Q = int(input())
d = deque(a)
ans = 0
for i in range(Q):
  b = list(input().split())
  if len(b) == 1:
    ans += 1
  elif b[1] == "1" and ans % 2 == 0:
    d.appendleft(b[2])
  elif b[1] == "1" and ans % 2 == 1:
    d.append(b[2])
  elif b[1] == "2" and ans % 2 == 0:
    d.append(b[2])
  elif b[1] == "2" and ans % 2 == 1:
    d.appendleft(b[2])
if ans % 2 == 1:
  d.reverse()
print("".join(d))
# Judge status: Accepted
n,m=map(int,input().split())
if n >= m//2:
  # cの数が律速
  print(m//2)
else:
  print(n+(m-n*2)//4)
# Judge status: Accepted
s = input()
if s[-1] =='s':
  print(s+'es')
else:
  print(s+'s')
# Judge status: Wrong Answer
S=str(input())
min_dif = 1000
for i in range(len(S)-2):
  dif = abs( int(S[i:i+3]) - 754)
  if min_dif > dif:
    min_dif = dif
print(dif)
# Judge status: Accepted
A, V = [int(n) for n in input().split()]
B, W = [int(n) for n in input().split()]
T = int(input())
print('YES' if (V-W)*T >= abs(B-A) else 'NO')
# Judge status: Accepted
s=list(input())

if set(s)=={'S','N'} or set(s)=={'W','E'} or set(s)=={'S','N','W','E'}:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

syozi = 1000
kabu = 0

for i in range(N-1):
  if A[i] < A[i+1]:
    kabu += syozi // A[i] 
    syozi -= (syozi // A[i]) * A[i]
  elif A[i] > A[i+1]:
    syozi += A[i] * kabu
    kabu = 0
  else:
    pass

syozi += A[-1] * kabu

print(syozi)
# Judge status: Wrong Answer
X=int(input())
if X==1:
  max=1
else:
  for i in range(1, X):
    for j in range(2, X):
      if i**j<=X:
        max=i**j
print(max)
# Judge status: Wrong Answer
n = str(input())

ans = ''

for i in range(len(n)):
  if n[i] == 'B':
    ans = ans[:-1]
  elif n[i] == '0':
    ans += '0'
  elif n[i] == '1':
    ans += '1'

print(ans)
# Judge status: Accepted
def resolve():
    def lcms(*numbers):
        from fractions import gcd
        from functools import reduce
        def lcm_base(x, y):
            return (x * y) // gcd(x, y)
        return reduce(lcm_base, numbers)
    
    N = int(input())
    T = [int(input()) for i in range(N)]
    print(lcms(*T))




if '__main__' == __name__:
    resolve()
# Judge status: Accepted
n = int(input())
cnt = 0
flg = False
for i in range(n):
  a,b = list(map(int,input().split()))
  if a == b:
    cnt +=1
    if cnt > 2:
      flg = True
  else:
    cnt = 0
if flg:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
n = int(input())
a = [int(x) for x in input().split()]
ans = [0]*n

for i in range(n-1, -1, -1):
  ans[i] = sum(ans[i+i+1:n:i+1]) % 2 != a[i]

print(sum(ans))
for i in range(n):
  if ans[i] == 1:
    print(i+1)
# Judge status: Accepted
X = int(input())
n = X//100
X -= n*100
if 5*n >= X:
    print(1)
else:
    print(0)
# Judge status: Accepted
l = [int(x) for x in input().split(' ')]
if l[0] <= l[2] and l[0] + l[1] >= l[2]:
  print("YES")
else:
  print("NO")
# Judge status: Wrong Answer
k, a, b = map(int, input().split())

if k == 1:
    print(2)
elif k < (a + 2) or (b - a) <= 2:
    print(1 + k)
else:
    cnt = (k - (a - 1)) // 2
    mod = (k - (a - 1)) % 2
    ans = (b - a)*cnt + a + mod
    print(ans)
# Judge status: Accepted
n = int(input())

def comeon():
    for _ in range(n):
        a, b = map(int, input().split())
        yield a, b

ab = list(comeon())

ans = 0
for a, b in ab[::-1]:
    a += ans
    diff = b - a % b if a % b > 0 else 0
    ans += diff

print(ans)
# Judge status: Wrong Answer
x = int(input())

L = [11,10,9,8,7]
ans = 0
for l in L:
    if x // l:
        ans += x // l * 2
        x %= l

print(ans+x)
# Judge status: Wrong Answer
x,a,b=map(int,input().split())
if abs(a-x)>abs(b-x):
  print('A')
else:
  print('B')
# Judge status: Wrong Answer
HP=int(input())

def Caracal(x):
  if x>1:
    ans=1+Caracal(x//2)*2
  elif x==1:
    ans=1
  else:
    ans=-1
  print(x,ans)
  return ans

print(Caracal(HP))
# Judge status: Accepted
N = int(input())
member = sorted(map(int, input().split()))
ans = sum(member[N::2])
print(ans)
# Judge status: Accepted
S=input()
s=sorted(S)
a=''.join(s)
if a=='abc':
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a = input()
b = input()
c = input()
next = a[0]
a = a[1:]
while True:
  if next == "a":
    if a == "":
      print("A")
      break
    else:
      next = a[0]
      a = a[1:]
  elif next == "b":
    if b == "":
      print("B")
      break
    else:
      next = b[0]
      b = b[1:]
  else:
    if c == "":
      print("C")
      break
    else:
      next = c[0]
      c = c[1:]
# Judge status: Accepted
n,k = map(int,input().split())
l = [0]*n
for _ in range(k):
    d = int(input())
    a = list(map(int,input().split()))
    for i in a:
        l[i-1] = 1
print(l.count(0))
# Judge status: Accepted
L, R = map(int, input().split())
if (L*R)%2 == 0:
    print('Even')
else:
    print('Odd')
# Judge status: Wrong Answer
s = "127"
if s[0] is "7":
  print("Yes")
elif s[1] is "7":
  print("Yes")
elif s[2] is "7":
  print("Yes")
else:
  print("No")
# Judge status: Accepted
x=input()
lst=x.split(" ")
print(int(lst[0])*int(lst[1]))
# Judge status: Accepted
arr = list(map(int, input().split()))

for i in range(len(arr)):
  if arr[i] == 0:
    print(i+1)
    break
# Judge status: Accepted
def resolve():
	n, m = map(int, input().split())
	g = [0]*n
	for i in range(m):
		a, b = map(int, input().split())
		g[a-1] += 1
		g[b-1] += 1
	for i in g:
		print(i)
resolve()
# Judge status: Accepted
n=int(input())
d=list(map(int,input().split()))
d.sort()
a=int(n/2)
i=int(n/2-1)
if d[a]!=d[i]:
    num=d[a]-d[i]
    print(num)
else:
    print(0)
# Judge status: Accepted
n = int(input())
L= list(map(int,input().split()))
L.sort(reverse = True)
if L[0] < sum(L[1:]):
    print('Yes')
else:
    print("No")
# Judge status: Accepted
K,X= map(int,input().split())
ans =""
for i in range(X-K+1,X+K):
    ans+=str(i) + " "
print(ans)
# Judge status: Accepted
k, a, b = map(int, input().split())

if b-a <= 2 or k-(a-1) < 2:
    print(k+1)

else:
    cycle = (k-(a-1))//2
    if (k-(a-1))%2 == 0:
        print(a + cycle *(b-a))
    else:
        print(a + cycle *(b-a) +1)
# Judge status: Accepted
s=list(str(input()))

ans=[]
for i in s:
  if i=='1':
    ans.append('1')
  elif i=='0':
    ans.append('0')
  else:
    if ans:
      ans.pop(-1)
    else:
      continue

print(''.join(ans))
# Judge status: Wrong Answer

S = input()
length = len(S)
for i in range(length):
  if S[i] == '7':
    print("Yes")
    break
# Judge status: Accepted
print('Christmas' + ' Eve' * (25 - int(input())))
# Judge status: Wrong Answer
A, B, X = map(int, input().split())
print('Yes' if (A + B) > X and X >= A else 'No')
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
dp=[0]*n
for i in range(n):
  dp[i]=a[i]-i
dp.sort()
ans=0
c=dp[n//2]
for j in range(n):
  ans+=abs(dp[j]-c)
print(ans)
# Judge status: Wrong Answer
n,m = map(int,input().split())
a = list(map(int,input().split()))

x = max(a)
s = 0
for i in a:
    s += i
y = [l for l in a if l >=s]
if len(y) >=m:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
n, b, r = map(int, input().split())
s = 0
while(n != 0):
    if n >=b:
        n -= b
        s += b
    else:
        s += n
    if n >= r:
        n -= r
    else:
        break
print(s)
# Judge status: Accepted
i=int(input())
sum=100
for j in range(1,100000000):
    sum=int(sum*1.01)
    if sum>=i:
        print(j)
        break
# Judge status: Wrong Answer
n=int(input())
x=""
while n!=0:
  x=str(n%2)+x
  n=(n//2)
print(0 if x =="" else x)
# Judge status: Accepted
S = input()

ACGT = 'A C G T'.split()
result = 0
tmp = 0
for i in S:
    if i in ACGT:
        tmp += 1
    else:
        tmp = 0
    if tmp > result:
        result = tmp

print(result)
# Judge status: Accepted
a, b, c = map(int, input().split())

ans = ((a-b)-c)*-1
if 0>ans:
    ans = 0
print(ans)
# Judge status: Accepted
s = str(input())
a = int(s[0]) * 10 + int(s[1])
b = int(s[2]) * 10 + int(s[3])
if 1 <= a <= 12 and 1 <= b <= 12:
    print('AMBIGUOUS')
elif 1 <= a <= 12:
    print('MMYY')
elif 1 <= b <= 12:
    print('YYMM')
else:
    print('NA')
# Judge status: Accepted
a,b=(map(int,input().split()))
ans=0
for i in range(1,b-a):
  ans+=i
print(ans-a)
# Judge status: Accepted
X = int(input())
x = 100
c = 0
while x < X:
    x = int(x *1.01)
    c += 1
print(c)
# Judge status: Accepted
mod = 10**9 + 7

N = int(input())

ans = 1

for i in range(N):
    ans = ans*(i+1) % mod

print(ans)
# Judge status: Accepted
import sys
input = lambda: sys.stdin.readline().rstrip()
n, m = map(int, input().split())
may_contain_red = [0 for _ in range(n + 1)]
num_of_ball = [1 for _ in range(n + 1)]
may_contain_red[1] = 1
for i in range(m):
    x, y = map(int, input().split())
    num_of_ball[x] -= 1
    num_of_ball[y] += 1
    if may_contain_red[x] != 0:
        may_contain_red[y] = 1
    if num_of_ball[x] == 0:
        may_contain_red[x] = 0

print(sum(may_contain_red))
# Judge status: Wrong Answer
import math
N = input()
LISTSTR = list(N)

ans = ''
for i in range(len(LISTSTR)):
    if i != 0:
        mae = ans[-1]
    str = LISTSTR[i]
    
    if i == len(LISTSTR):
        ans += 'D'
    elif str == '?' and i == 0:
        ans += 'P'
    elif str != '?':
        ans += str
    elif str == '?' and mae == 'P':
        ans += 'D'
    else:
        ans += 'D'


if len(LISTSTR) == 1:
    ans = 'D'

print(ans)
# Judge status: Accepted
import math 
a,b,n = map(int,input().split())
ans = b//n - (a-1)//n
print(ans)
# Judge status: Accepted
n = int(input())
sum = 0

for i in range(n):
  if (i + 1) % 3 != 0 and (i + 1) % 5 != 0:
    sum += i + 1
    
print(sum)
# Judge status: Accepted
n = int(input())
aaa = list(map(int, input().split()))

ans = 10 ** 10
for x in range(-100, 101):
    curr_cost = 0
    for a in aaa:
        curr_cost += (x - a) ** 2
    ans = min(ans, curr_cost)
print(ans)
# Judge status: Wrong Answer
from _collections import defaultdict
from itertools import combinations
n=int(input())
S=input()
X=defaultdict(int)
for s in S:
    X[s]+=1
A=1
for x in X.values():
    A*=x
ANS=A
for i in range(1,len(X.keys())//2+1):
    for comb in combinations(X.keys(),i):
        for c in comb:
            ANS+=X[c]+A//X[c]
print(ANS%(10**9+7))