peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
A, B, C = map(int, input().split())
K = int(input())

n = 0

while A >= B :
  B *= 2
  n += 1
  
while B >= C :
  C *= 2
  n += 1

if n <= K :
  print("Yes")
else :
  print("No")
# Judge status: Accepted
from functools import reduce
# input
dev     = pow(10, 9) + 7
n, a, b = map( int, input().split() )

# calc
def nCr( n, r ):
    x = reduce( lambda a, b: a*b%dev, range(n, n-r, -1) )
    y = reduce( lambda a, b: a*b%dev, range(1, r+1,  1) )
    # mod gyakugen
    y = pow( y, dev-2, dev)
    return x * y % dev
ans  = pow(2, n, dev) - 1 - nCr(n,a) - nCr(n,b)
ans %= dev

# out
print(ans)
# Judge status: Accepted
# coding: utf-8
# Your code here!

A1, A2, A3 = map(int, input().split())

if A1 + A2 + A3 <= 21 : 
    print('win')
else : 
    print('bust')
# Judge status: Accepted
import sys
import math
import numpy as np
import copy

def main():
    a, b, c = map(int, input().split())
    x = sorted([a, b, c])
    print(10*x[2]+x[1]+x[0])

    return 0

if __name__ == '__main__':
    sys.exit(main())
# Judge status: Wrong Answer
n=int(input())
s=input()

i=0
for ss in s:
  if ss=="#":
    break
  i+=1

s=s[i:]  
if s=="":
  print(0)
  exit()


while s[-1]=="#":
  s=s[:-1]
  if s=="":
    print(0)
    exit()
  
print(min(s.count("."),s.count("#")))
# Judge status: Wrong Answer
#B - Nice Shopping 
A,B,M = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
X = []
Y = []
C = []
for i in range(M):
    x,y,c = map(int,input().split())
    X.append(x)
    Y.append(y)
    C.append(c)

#割引券を使う場合
best_M_idx = C.index(max(C))
pay_M = a[X[best_M_idx]-1] + b[Y[best_M_idx]-1]-max(C)
#使わない場合
D = [i + j for i,j in zip(a,b)] 
pay = min(D)
print(min(pay,pay_M))
# Judge status: Wrong Answer
n = input()
List = ['aiueo']
if 'n' in List:
    print('vowel')
else:
    print('consonant')
# Judge status: Accepted
H, N = map(int, input().split())
A = list(map(int, input().split()))

if sum(A)>=H:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
from fractions import gcd
from functools import reduce
def lcm(x, y):
  return (x * y) // gcd(x, y)
def ll(numbers):
  return reduce(lcm, numbers, 1)
def modinv(a):
    return pow(a,m-2,m)
n=int(input())
a=list(map(int,input().split()))
l=ll(a)
x=0
m=10**9+7
lm=l%m
for i in range(n):
  x+=(lm*modinv(a[i]))%m
  x=x%m
print(x)
# Judge status: Accepted
import bisect

n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ra = [0] * (n + 1)
rb = [0] * (m + 1)
for i in range(n):
    ra[i + 1] = a[i] + ra[i]

for j in range(m):
    rb[j + 1] = b[j] + rb[j]

ans = 0
for i in range(n + 1):
    zan = k - ra[i]
    if zan < 0:
        break
    rbi = bisect.bisect_right(rb, zan) - 1
    if rbi < 0:
        rbi = 0
    ans = max(ans, i + rbi)
print(ans)
# Judge status: Accepted
n=input()
if int(n)%10==0:
  print(10)
else:
  print(sum(map(int,list(n))))
# Judge status: Accepted
s=str(input())
a=s[:2]
b=s[-2:]
m=['01','02','03','04','05','06','07','08','09','10','11','12']
if a not in m and b in m:
  print('YYMM')
elif a in m and b not in m:
  print('MMYY')
elif a in m and b in m:
  print('AMBIGUOUS')
else:
  print('NA')
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-
import math

n, k = map(int, input().split())
result = math.log(n, k)
print(math.ceil(result))
# Judge status: Wrong Answer
s = int(input())

def f(n):
    if n%2 == 0:
        return n/2
    else:
        return 3*n+1
    
memo = {i: 0 for i in range(1, 999999)}

a = s
i = 1

while(True):
    if memo[f(a)]:
        i += 1
        break

    a = f(a)
    memo[a] = 1
    i += 1
    
print(i)
# Judge status: Wrong Answer
n, m = map(int, input().split())

abl = []
for _ in range(n):
    ab = list(map(int, input().split()))
    abl.append(ab)

cdl = []
for _ in range(m):
    cd = list(map(int, input().split()))
    cdl.append(cd)

ansl = [0 for _ in range(n)]
for i, ab in enumerate(abl):
    ans = 10**8
    for j, cd in enumerate(cdl):
        if abs(ab[0]-cd[0]) + abs(ab[1]-cd[1]) < ans:
            ansl[i] = j
            ans = abs(ab[0]-cd[0]) + abs(ab[1]-cd[1])

for ans in ansl:
    print(ans+1)
# Judge status: Accepted
a,b=map(int,input().split())
temp=b-a
k=0
for i in range(temp):
  k=k+i
print(k-a)
# Judge status: Wrong Answer
import math
a = int(input())
b = a*math.pi
print(b)
# Judge status: Accepted
d = 0
t = 0
s = 0

d, t, s = map(int, input().split())
if s*t >= d:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N, K = map(int, input().split())
H = list(map(int, input().split()))
H.sort(reverse=True)
ans = 0

for i in range(N):
    if i + 1 <= K:
        continue
    ans = ans + H[i]

print(ans)
# Judge status: Accepted
n = int(input())
ab = [list(map(int, input().split())) for _ in range(n)]
ab.sort(key = lambda x:x[1])

c = sum([i for i,j in ab])
abmax = max([j for i,j in ab])

ab.reverse()
ans = "Yes"
x = c + 0
for i,j in ab:
    if not x <= j:
        ans = "No"
        break
    x -= i

print(ans)
# Judge status: Accepted
S,T = input().split()
A,B = map(int,input().split())
U = input()
if S == U:
    print(A-1,B)
else:
    print(A,B-1)
# Judge status: Accepted
n = int(input())
print(800*n - n//15 * 200)
# Judge status: Accepted
n, m = map(int, input().split())
i = 0
c = 0
while (i + 1) + i < (n - i - (i + 1)) and c < m:
    print(i + 1, n - i)
    c += 1
    i += 1
a = n // 2 + n % 2
for i in range(m - c):
    print(a - i - 1, a + i + 1)
# Judge status: Wrong Answer
a, b, n = map(int, input().split())
n = n - 1
print(int((a * n) / b) - a * int(n / b))
# Judge status: Accepted
n = int(input())
l = list(map(int, input().split()))
ans = 0
for i in range(n):
    if i % 2 == 0 and l[i] % 2 == 1:
        ans += 1
print(ans)
# Judge status: Accepted
n = int(input())
save = 1
for i in range(int(n**(1/2)), 1, -1):
    if n % i == 0:
        save = i
        break
print(int(save+n/save - 2))
# Judge status: Accepted
#!/usr/bin/env python3
s = input()
if s == "RRR":
    print(3)
elif s== "RRS" or s=="SRR":
    print(2)
elif s == "SSS":
    print(0)
else:
    print(1)
# Judge status: Accepted
lis=[]
ll=["a","b","c"]
for i in range(3):
  lis.append(list(input()))
turn=0
while 1:
  if lis[turn]==[]:
    print(ll[turn].upper())
    break
  turn=ll.index(lis[turn].pop(0))
# Judge status: Accepted
N=int(input())
ans=""
while N>0:
    tmp=(N-1)%26
    ans=chr(int(tmp)+97)+ans
    N=int((N-tmp)/26)
print(ans)
# Judge status: Wrong Answer
import fractions

a,b,c,d = map(int, input().split(" "))
gcd = fractions.gcd(c, d)
lcm = c * d / gcd
bwari = b - ((int)(b/c) + (int)(b/d) - (int)(b/(lcm)))
awari = (a - 1)- ((int)((a-1)/c) + (int)((a-1)/d) - (int)((a-1)/(lcm)))
print(bwari - awari)
# Judge status: Accepted
#!/usr/bin/env python3
from collections import*
MOD = 10**9+7
input();i = 1
for c in Counter(input()).values():i *= c+1
print(~-i % MOD)
# Judge status: Accepted
import math

n = int(input())
X = math.ceil(n / 1.08)

if math.floor(X * 1.08) == n:
	print(X)
else:
	print(":(")
# Judge status: Accepted
N,K,Q = map(int,input().split())
points = [0]*N

for i in range(Q):
    anchor = (int(input()))-1
    points[anchor] += 1

for i in range(N):
    if K - (Q - points[i]) >0:
        print("Yes")
    else:
        print("No")
# Judge status: Wrong Answer
H, A = map(int, input().split())

print(H // A + 1)
# Judge status: Accepted
import collections
n=int(input())
s=input()
ans=0
for i in range(1,n-1):
    l=list(set(s[:i]) & set(s[i:]))
    c = collections.Counter(l)
    ans=max(ans,len(c.keys()))
print(ans)
# Judge status: Accepted
D,T,S=map(int,input().split())
if D/S<=T:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
n=int(input())
a = list(map(int,input().split()))[:n]
a.sort(reverse=True)

A=B=I=0
for i in a:
    if I %2:B+=i
    else:A+=i
    I+=1

print(a)
# other
# print(sum(a[::2]) - sum(a[1::2]))
# Judge status: Accepted
s=input()
print('No' if 'N' in s and 'S' not in s or 'S' in s and 'N' not in s or 'W' in s and 'E' not in s or 'E' in s and 'W' not in s else 'Yes')
# Judge status: Accepted
# B - Golden Apple

n, d = map(int, input().split())
print((n+2*d)//(2*d+1))
# Judge status: Accepted
x = input()

if x in "753":
  print("YES")
else:
  print("NO")
# Judge status: Accepted
from math import*
def fact_p(n):
  m=n
  i=2
  a=0
  while n>1:
    if i>m**.5:
      a=n
      break
    while n%i==0:
      n//=i
      a=i
    i+=1  
  return a
n=int(input())
x2=y1=ceil(n**.5+.5) if ceil(n**.5+.5)<=10**9 else 10**9
x1=fact_p(x2*y1-n)
y2=(x2*y1-n)//x1 if x1 else 0
print(0,0,x1,y1,x2,y2)
# Judge status: Accepted
N, R = map(int, input().split())
if N >= 10:
  print(R)
else:
  print((R + 100 * (10 - N)))
# Judge status: Wrong Answer
n, k = list(map(int, input().split()))
x = n % k
print(min(x, x-k))
# Judge status: Accepted
a,b = map(int,input().split())

if a <= 0 and b >= 0:
    print("Zero")
elif a > 0:
    print("Positive")
else:
    l = b-a+1
    if l%2 == 0:
        print("Positive")
    else:
        print("Negative")
# Judge status: Accepted
word = input()
wset = set(word)
a = 'Yes'
for w in wset:
  if word.count(w) % 2 != 0:
    a = 'No'
print(a)
# Judge status: Accepted
print(max(map(len,input().split("S"))))
# Judge status: Accepted
s=input()

n = len(s)

countC = 0

alf = [chr(ord('a') + i) for i in range(26)]

for i in range(n):
    #print(i)
    if i == 0 and s[i] != 'A':
        print('WA')
        exit()
    elif i == 0 and s[i] == 'A':
        continue
    elif s[i] == 'C' and 1 < i and i < n-1:
        countC += 1
    elif s[i] in alf:
        continue
    else:
        print('WA')
        exit()
    
if countC == 1:
    print('AC')
else:
    print('WA')
# Judge status: Wrong Answer
from math import log2

X,Y = [int(i) for i in input().split()]

print(int(log2(Y/X))+1)
# Judge status: Wrong Answer
n,m = map(int,input().split())
if m < 2*n:
	print(n//2)
else:
	m -= 2*n
	print(n+(m//4))
# Judge status: Wrong Answer
N = int(input())
out = "Yes"
S = input()
L = []

L.append(S)
for i in range(N-1):
    T = input()
    if T in L:
        out = "No"
    if T[0]!=S[-1]:
        out = "No"
    S = T
print(out)
# Judge status: Accepted
A, B, C = map(int, input().split())
if (A * B * C) % 2 == 0:
    ans = 0
    print(ans)
else:
    ans = float('inf')
    V = A*B*C
    AB = A*B
    BC = B*C
    CA = C*A
    ans = min(ans, abs((A//2)*BC - ((A//2) + 1)*BC))
    ans = min(ans, abs((B//2)*CA - ((B//2) + 1)*CA))
    ans = min(ans, abs((C//2)*AB - ((C//2) + 1)*AB))
    print(ans)
# Judge status: Accepted
N, H = map(int, input().split())
A = [0]*N
B = [0]*N
for i in range(N):
  A[i],B[i] = map(int, input().split())

a = max(A)
B.sort()
cnt = 0
for b in B[::-1]:
  if b>a:
    H -= b
    cnt += 1
    if H<=0:
      break
if H>0:
  cnt += (H+a-1)//a
    

print(cnt)
# Judge status: Accepted
N = int(input())
C = {(i,j):0 for i in range(1,10) for j in range(1,10)}
num = list(range(1,10))
for k in range(1,N+1):
    k = str(k)
    i = int(k[0])
    j = int(k[-1])
    if i in num and j in num:
        C[(i,j)] += 1
cnt = 0
for i in range(1,10):
    for j in range(1,10):
        cnt += C[(i,j)]*C[(j,i)]
print(cnt)
# Judge status: Accepted
N = int(input())
S = input()
ans = ""
for s in S:
  ans += chr((ord(s) + N-65)%26 + 65)
print(ans)
# Judge status: Accepted
x, y = map(int, input().split())

for t in range(0, 101):
    c = x - t
    if t*4+c*2 == y and c >= 0:
        print('Yes')
        exit()

print('No')
# Judge status: Wrong Answer
a, b = [int(i) for i in input().split()]

print("Yay!" if a <= b <= 8 else ":(")
# Judge status: Accepted
n=int(input())
a=[int(input()) for _ in range(n)]
s=sorted(a)
maxi=max(a)
maxi2=s[-2]
for i in a:
    if i == maxi:
        print(maxi2)
    else:
        print(maxi)
# Judge status: Accepted
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

x,y,z = map(int,input().split())
x-= 2*z
ans = x//(y+z)
if x%(y+z)>=y:
    ans += 1
print(ans)
# Judge status: Accepted

def main():
    A, V = map(int,input().split(' '))
    B, W = map(int,input().split(' '))
    T = int(input())

    if A > B:
        if A-(V*T) <= B-(W*T):
            print('YES')
        else:
            print('NO')
    else:
        if A+V*T >= B+W*T:
            print('YES')
        else:
            print('NO')
    


if __name__ == "__main__":
    main()
# Judge status: Accepted
N, K = map(int, input().split())

ans = 0
cnt = 0

for n in range(1, N+1):
    c = 0
    while True:
        total = n * 2 ** c
        if total >= K:
            ans += 0.5 ** c / N
            break
        c += 1

print(ans)
# Judge status: Accepted
def nCr(n, r, mod):
    x, y = 1, 1
    for r_ in range(1, r+1):
        x = x*(n+1-r_)%mod
        y = y*r_%mod
    return x*pow(y, mod-2, mod)%mod

x, y = map(int, input().split())
mod = 10**9+7
if (x+y)%3 or 2*x<y or 2*y<x:
    print(0)
else:
    print(nCr((x+y)//3,(2*x-y)//3, mod))
# Judge status: Accepted
n = int(input())
s = input()
wcount = 0
min_val = 0
for i in range(n):
    if s[i] == '.':
        wcount += 1
    min_val = min(min_val, i + 1 - wcount * 2)
print(wcount + min_val)
# Judge status: Accepted
A, B = map(str, input().split())
l = list(range(int(A), int(B)+1))
c = 0
for i in l:
  t = str(i)
  if t[0] == t[4] and t[1] == t[3]:
    c += 1
print(c)
# Judge status: Accepted
n = int(input())
k = int(input())
x = int(input())
y = int(input())

if n <= k :
    print(x*n)
else :
    print(x*k+y*(n-k))
# Judge status: Accepted
a=[i**2 for i in range(100000)]
n=int(input())
for i in range(len(a)):
    if n<a[i]:
        print(a[i-1])
        exit()
# Judge status: Accepted
S = input()
nS = len(S)
white = ("01"*100000)[:nS]
black = ("10"*100000)[:nS]
sa_white = len([1 for x,y in zip(S, white) if x!=y])
sa_black = len([1 for x,y in zip(S, black) if x!=y])
print(min(sa_white, sa_black))
# Judge status: Accepted
n = int(input())
ans = 0
for i in range(1, n+1):
    if i % 3 != 0 and i % 5 != 0:
        ans += i

print(ans)
# Judge status: Accepted
s = input()
ch = 0
for i in range(len(s)-1):
    if s[i+1] != "9":
        ch = 1
        break
cnt = 9*(len(s)-1)
if ch == 1:
    print(cnt + int(s[0])-1)
else:
    print(cnt + int(s[0]))
# Judge status: Accepted
from fractions import gcd

N, M = map(int, input().split())
A = [int(i) // 2 for i in input().split()]  

A_lcm = 1
for i in range(N):
    A_lcm *= A[i] // gcd(A_lcm, A[i])
    
for i in A:
    if A_lcm // i % 2 == 0:
        print(0)
        exit()

print((M // A_lcm + 1) // 2)
# Judge status: Accepted
n, m = [int(x) for x in input().split(" ")]
times = [int(x) for x in input().split(" ")]

s = sum(times)

if s > n:
    print(-1)
else:
    print(n - s)
# Judge status: Accepted
import heapq

N, M = map(int, input().split())
work = [[] for _ in range(M)]
for _ in range(N):
    a, b = map(int, input().split())
    if a <= M:
        work[a-1].append(b)
ans = 0
q = []
heapq.heapify(q)
for i in range(M):
    for x in work[i]:
        heapq.heappush(q, -x)
    if q != []:
        ans += heapq.heappop(q)*(-1)
print (ans)
# Judge status: Accepted
ST = input().split()
S = ST[0]
T = ST[1]

AB = input().split()
A = int(AB[0])
B = int(AB[1])

U = input()

if S == U:
  print(A-1,B)
else:
  print(A,B-1)
# Judge status: Accepted
Q, H, S, D = map(int, input().split())
N = int(input()) * 4
A = [Q, min(2 * Q, H), min(4 * Q, 2 * H, S), min(8 * Q, 4 * H, 2 * S, D)]
ans = (N // 8) * A[3] + ((N % 8) // 4) * A[2] + ((N % 4) // 2) * A[1] + (N % 2) * A[0]
print(ans)
# Judge status: Wrong Answer
A, B, M = [int(i) for i in input().split(" ")]

a = [int(i) for i in input().split(" ")]
b = [int(i) for i in input().split(" ")]
C = []

for i in range(M):
  c = [int(i) for i in input().split(" ")]
  C.append(c)

print(a)

m = 1000000

for i in a:
  for j in b:
    cost = i + j
    if m >= cost:
      m = cost

for c in C:
  cost = a[c[0] - 1] + b[c[1] - 1] - c[2]
  if m >= cost:
    m = cost

print(m)
# Judge status: Accepted
N = int(input())
A = [int(x) for x in input().split()]

cnt = [0 for _ in range(10**5 + 5)]
for a in A:
    cnt[a] += 1

ans = sum(A)

Q = int(input())

for _ in range(Q):
    B, C = map(int, input().split())

    ans -= B * cnt[B]
    ans += C * cnt[B]

    cnt[C] += cnt[B]
    cnt[B] = 0

    print(ans)
# Judge status: Accepted
#47
N = int(input())
l0,l1 = 2,1
l2 = l1
for i in range(N-1):
    l2 = l0 + l1
    l0 = l1
    l1 = l2
    
print(l1)
# Judge status: Wrong Answer
N = input()

M = ord('N')+1

J = chr(M)

print(J)
# Judge status: Wrong Answer
N,D=list(map(int,input().split()))
count=0
for i in range(N):
  x,y=list(map(int,input().split()))
  if((x**2 + y**2)<=D):
    count+=1
print(count)
# Judge status: Wrong Answer
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n=ni()
a=nl()
nums = [0]*10**6
for i in range(n):
  nums[a[i]]+=1
q=ni()
ans=0
for i in range(len(nums)):
  ans+=nums[i]*i

for i in range(q):
  b,c=nm()
  ans-=nums[b]*b
  ans+=nums[c]*c
  nums[c]+=nums[b]
  nums[b]=0
  print(ans)
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
sa=sum(a)
sb=sum(b)
if sb<sa:
  print("No")
  exit(0)
husoku=0
for aa,bb in zip(a,b):
  if bb<aa:
    husoku+=aa-bb

sa+=2*husoku
sb+=husoku
if sa<sb:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)


n, s = map(int, readline().split())
x = [v-s for v in list(map(int, readline().split()))]

print(abs(gcd(*x)))
# Judge status: Accepted
def main():
    s, c = [int(x) for x in input().split()]

    total = s
    s_req = s * 2

    if c <= s_req:
        print(c // 2)
        return

    c -= s_req
    total += c // 4

    print(total)



if __name__ == "__main__":
    main()
# Judge status: Accepted
n = int(input())
s = input()

R = 0
G = 0
B = 0

for i in range(n):
    if s[i] == "R":
        R += 1
    elif s[i] == "G":
        G += 1
    elif s[i] == "B":
        B += 1

cnt = 0
for i in range(n):
    for j in range(i+1, n):
        k = 2*j - i
        if 0 < k < n:
            if s[i] != s[j] and s[j] != s[k] and s[i] != s[k]:
                cnt += 1

ans = R*G*B - cnt
print(ans)
# Judge status: Accepted
Sa = list(input())
Sb = list(input())
Sc = list(input())

Sa.reverse()
Sb.reverse()
Sc.reverse()

now = 0
while True:
    if now == 0:
        if not Sa: break
        s = Sa.pop()
    elif now == 1:
        if not Sb: break
        s = Sb.pop()
    else:
        if not Sc: break
        s = Sc.pop()
    
    now = ord(s) - ord("a")

print(chr(ord("A") + now))
# Judge status: Accepted
a,b,x = map(int,input().split())

if a <= x <= a+b:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
from collections import defaultdict
n, m = map(int, input().split())
d = defaultdict(list)
for i in range(m):
  a, b = map(int, input().split())
  d[a].append(b)
ans = ''
for mid in d[1]:
  if ans == '':
    for goal in d[mid]:
      if goal == n:
        ans = 'POSSIBLE'
        break
if ans == '':
  ans = 'IMPOSSIBLE'
print(ans)
# Judge status: Accepted
o=input()
e=input()

ans=''
for i in range(len(e)):
  ans+=o[i]+e[i]
if len(o)>len(e):
  ans+=o[len(o)-1]
print(ans)
# Judge status: Accepted
n,m = map(int,input().split())
path = [[] for _ in range(n)]
for _ in range(m):
  a,b = map(int,input().split())
  path[a-1].append(b-1)
  path[b-1].append(a-1)
for p in path:
  print(len(p))
# Judge status: Accepted
s = input()
da = 'abcdefghijklmnopqrstuvwxyz'
flag = True
for i in da:
  for j in s:
    if j == i:
      flag = False
  if flag:
    print(i)
    flag = False
    break
  else:
    flag = True
if flag:
  print('None')
# Judge status: Accepted
def resolve():
  base = 10**9+7
  S = int(input())
  dp = [0] * (S+1)
  dp[0] = 1

  for i in range(1, S+1):
    for u in range(i-2):
      dp[i] += dp[u]
      dp[i] %= base
  # print(dp)
  print(dp[S]%base)

if __name__ == "__main__":
  resolve()
# Judge status: Accepted
w = input()
L = list(w)

cnt = 0
for i in L:
    if L.count(i) % 2 == 1:
        cnt += 1
        break
print('Yes' if cnt == 0 else 'No')
# Judge status: Accepted
n, m = map(int, input().split())
lis = [list(map(int, input().split())) for _ in range(m)]
ans = -1
if n == 1:
    i = 0
else:
    i = 10**(n-1)
while (ans == -1) & (i < 10**n):
    s = 0
    for j in lis:
        if str(i)[j[0]-1] == str(j[1]):
            s += 1
        else:
            s += 0
    if s == m:
        ans = i
    else:
        i += 1
print(ans)
# Judge status: Wrong Answer
import math
x = int(input().split()[0])
def get_sieve_of_eratosthenes(n):
    prime = []
    limit = math.sqrt(n)
    data = [i + 1 for i in range(1, n)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]

data = get_sieve_of_eratosthenes(2*x+100)
for i in data:
  if i > x:
    print(i)
    break
# Judge status: Accepted

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

print("NO" if a > x or a + b < x else "YES")
# Judge status: Accepted
N, P = map(int, input().split())
A = list(map(int, input().split()))
B = [a % 2 for a in A]
count_0 = B.count(0)
count_1 = B.count(1)

if count_1 == 0:
    if P == 0:
        ans = 2 ** N
    else:
        ans = 0
else:
    ans = 2 ** (N - 1)
print(ans)
# Judge status: Accepted
L=float(input())

print('{:.08f}'.format((L/3)**3))
# Judge status: Wrong Answer
N, M = list(map(int, input().split()))
if N == M:
    print("yes")
else:
    print("no")
# Judge status: Accepted
a = int(input())

ans = 0
for i in range(a+1):
    if i % 3 != 0 and i % 5 != 0:
        ans += i

print(ans)
# Judge status: Wrong Answer
N,A,B,C,D = map(int,input().split())
S = input()

goal = max(C,D)
if '##' in S[A-1:goal]:
  print("No")
  exit()

ok = True
# 追い越す必要がある
if D < C:
  # 間に3マスあきがない or (.D.)でない
  if not ('...' in S[B-1:D]):
    ok = False

# 必要がない場合は問題ない

if ok:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
N,A,B=map(int,input().split())

nin=A*(N-1)+B
nax=A+B*(N-1)

if N==1 or A>B:
    print(0)
    exit()
print(nax-nin+1)
# Judge status: Accepted
c = str(input())
print("vowel" if c in "aiueo" else "consonant")
# Judge status: Accepted
S = input()
n = len(S) + 1
num = [0] * n
for i in range(n-1):
    if S[i] == '<':
        num[i + 1] = max(num[i] + 1, num[i + 1])
for i in range(n - 2, -1, -1):
    if S[i] == '>':
        num[i] = max(num[i + 1] + 1, num[i])
print(sum(num))
# Judge status: Wrong Answer
#!/usr/bion/env python3

S = input()

ans = 0

if S == "SUN":
    ans = 6
if S == "MON":
    ans = 5
if S == "TUE":
    ans = 4
if S == "WED":
    ans = 3
if S == "FRI":
    ans = 2
if S == "SAT":
    ans = 1


print(ans)
# Judge status: Accepted
import string
C = input()

al = string.ascii_lowercase
for i in range(len(al)):
  if al[i] == C:
    print(al[i+1])
    break
# Judge status: Accepted
import heapq
n,m=map(int,input().split())
w=[[] for i in range(m)]
for i in range(n):
  a,b=map(int,input().split())
  a-=1
  if a>=m:
    continue
  w[a].append(-b)

h=[]
c=0
for i in range(m):
  for j in w[i]:
    heapq.heappush(h,j)
  try:
    c+=heapq.heappop(h)
  except:
    pass
print(-c)
# Judge status: Wrong Answer
N=int(input())
A=[]
B=[]
for i in range (N):
	A.append(list(map(int,input().split())))
for i in range (N):
	B.append(A[i][1])
C=sorted(A,key=lambda A: A[1])
tmp=0
count=0
for i in range (N):
  tmp+=C[i][0]
  if tmp<=C[i][1]:
    count+=1
  else:
    print("No")
if count==N:
  print("Yes")
# Judge status: Wrong Answer
a,b,c = map(int,input().split())

if a-b == c-b:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
import math
N, M = map(int, input().split())
A = list(map(int, input().split()))
c = 0
t = math.ceil(sum(A)/(4*M))

for i in A:
    if i >= t:
        c += 1
if c >= M:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n,a=map(int,open(0))
print('YNeos'[n%500>a::2])
# Judge status: Wrong Answer
N,K = map(int, input().split())
ans = 0
for i in range(K,N+1):
    ans += (N*i - i**2 + i +1)%(10**9 +7)
print(ans%(10**9 +7))