Harryxun/stf_run huggingface dataset:
# -*- coding: utf-8 -*-
#<参考>https://atcoder.jp/contests/abc178/submissions/16700679
import sys
from heapq import *
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
A = list(map(int,readline().split()))
B = list(map(int,readline().split()))

countA = [0]*(N+1)
countB = [0]*(N+1)
for i in range(N):
    countA[A[i]] += 1
    countB[B[i]] += 1

q = []
onlyA = []
onlyB = []
for i in range(N):
    if countA[i] and countB[i]:
        heappush(q,(-countA[i]-countB[i],i))
    elif countA[i]:
        onlyA.append(i)
    else:
        onlyB.append(i)
        
heapify(q)

if q and -q[0][0] > N:
    print('No')
    sys.exit()
print('Yes')

ans = []

while q:
    _,x = heappop(q)
    if q:
        _,y = heappop(q)
        flag = True
    else:
        y = onlyB.pop()
        flag = False
    countA[x] -= 1 
    countB[y] -= 1
    ans.append((x,y))
    if countA[x]:
        heappush(q,(-countA[x]-countB[x],x))
    else:
        for _ in range(countB[x]):
            onlyB.append(x)
            
    if flag and countB[y]:
        heappush(q,(-countA[y]-countB[y],y))
    if flag and not countB[y]:
        for _ in range(countA[y]):
            onlyA.append(y)

while onlyA:
    x,y = onlyA.pop(),onlyB.pop()
    ans.append((x,y))

ans.sort()
X,Y = zip(*ans)
print(*Y)          

### FIXED CODE ###

# -*- coding: utf-8 -*-
#<参考>https://atcoder.jp/contests/abc178/submissions/16700679
import sys
from heapq import *
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
A = list(map(int,readline().split()))
B = list(map(int,readline().split()))

countA = [0]*(N+1)
countB = [0]*(N+1)
for i in range(N):
    countA[A[i]] += 1
    countB[B[i]] += 1

q = []
onlyA = []
onlyB = []
for i in range(N+1):
    if countA[i] and countB[i]:
        heappush(q,(-countA[i]-countB[i],i))
        continue
    for _ in range(countA[i]):
        onlyA.append(i)
    for _ in range(countB[i]):
        onlyB.append(i)
        
heapify(q)

if q and -q[0][0] > N:
    print('No')
    sys.exit()
print('Yes')

ans = []

while q:
    _,x = heappop(q)
    if q:
        _,y = heappop(q)
        flag = True
    else:
        y = onlyB.pop()
        flag = False
    countA[x] -= 1 
    countB[y] -= 1
    ans.append((x,y))
    if countA[x]:
        heappush(q,(-countA[x]-countB[x],x))
    else:
        for _ in range(countB[x]):
            onlyB.append(x)
            
    if flag and countB[y]:
        heappush(q,(-countA[y]-countB[y],y))
    if flag and not countB[y]:
        for _ in range(countA[y]):
            onlyA.append(y)

while onlyA:
    x,y = onlyA.pop(),onlyB.pop()
    ans.append((x,y))

ans.sort()
X,Y = zip(*ans)
print(*Y)
import math;r=int(input());print(math.pi*(r**2),math.pi*r*2)


### FIXED CODE ###

import math;r=float(input());print(math.pi*(r**2),math.pi*r*2)
n,x = map(int, input().split())
l = list(map(int, input().split()))

s = 0
d = 0
for i in range(n):
  d += l[i]
  s += 1
  if t > x:
    break
print(s)

### FIXED CODE ###

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

s = 1
d = 0
for i in l:
  d += i
  if d <= x:
    s += 1
print(s)
from math import gcd
from functools import reduce
n=int(input())
a=list(map(int,input().split()))
k=reduce(lambda x,y:x*y//gcd(x,y),a)
ans=sum(list(map(lambda x:k//x,a)))
print(ans%(10**9+7))


### FIXED CODE ###

from fractions import gcd
from functools import reduce
n=int(input())
a=list(map(int,input().split()))
k=reduce(lambda x,y:x*y//gcd(x,y),a)
ans=sum(list(map(lambda x:k//x,a)))
print(ans%(10**9+7))
n = int(input())
s = list(input())

cnt = 0
for i in range(len(s)-2):
    if s[i] == '#' and s[i+1] == '.':
        if s[i+2] == '.':
            s[i] = '.'
        else:
            s[i+1] = "#"

        cnt += 1

if s[-2] == "#" and  s[-1] == ".":
    s[-1] = "#"
    cnt += 1

print(cnt)


### FIXED CODE ###

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

w_sum = [0]
b_sum = [0]
for i in range(len(s)):
    if s[i] == '.':
        w_sum.append(w_sum[-1] + 1) 
        b_sum.append(b_sum[-1])
    else:
        b_sum.append(b_sum[-1] + 1)
        w_sum.append(w_sum[-1])

assert len(w_sum) == len(b_sum)
assert len(w_sum) == len(s) + 1

minSum = 10 ** 5
for i in range(len(s)):
    minSum = min(minSum, b_sum[i] + (w_sum[-1] - w_sum[i+1]))
    
print(minSum)

# .##...####... ->
# ......#######
import sys
import os
f = open('input.txt', 'r')
sys.stdin = f
N = int(input())
v = list(map(int, input().split()))
v.sort()
tmp = v[0]
ave = 0
for i in range(1, N):
    tmp += v[i]
    ave = tmp / 2
    tmp = ave
print(ave)


### FIXED CODE ###

N = int(input())
v = list(map(int, input().split()))
v.sort()
tmp = v[0]
ave = 0
for i in range(1, N):
    tmp += v[i]
    ave = tmp / 2
    tmp = ave
print(ave)
a,b =(int(i) for i in input.split())
if a>b:
 print("a > b")
 


### FIXED CODE ###

a,b =map(int, input().split())
if a > b:
 print("a > b")
elif  a == b:
 print("a == b")
else : 
 print("a < b")
import sys
sys.setrecursionlimit(10**7)

N, Q = map(int, input().split())

# 木構造をリストで表現する
G = [[] for _ in range(N)]
for i in range(N-1):
    a, b = map(int, input().split())
    a = a - 1
    b = b - 1
    G[a].append(b)

# 各操作で与えられる値を、各頂点ごとに集計しておく
P = [0] * N
for i in range(Q):
    p, x = map(int, input().split())
    p = p - 1
    P[p] += x

# 各頂点のカウンター
Count = [0] * N


def dfs(v, point):
    # 現在いる頂点vの親までの値をpointとし、
    new_point = point + P[v]
    Count[v] = str(new_point)

    for next_v in G[v]:
        dfs(next_v, new_point)


dfs(0, 0)

res = " ".join(Count)

print(res)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

 
N,Q = map(int,input().split())
AB = [[int(x) for x in input().split()] for _ in range(N-1)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]
 
graph = [[] for _ in range(N+1)]
for a,b in AB:
    graph[a].append(b)
    graph[b].append(a)
 
value = [0] * (N+1)
for p,x in PX:
    value[p] += x
 
def dfs(v,parent,add):
    value[v] += add
    for x in graph[v]:
        if x == parent:
            continue
        dfs(x,v,value[v])
 
dfs(1,0,0)
 
answer = ' '.join(map(str,value[1:]))
print(answer)
H,W = map(int,input().split())
s = [["."] *(W+2)]+[["."]+list(input())+["."] for _ in range(W)]+[["."] *(W+2)]
#print(*s, sep="\n")
for i in range(1,H+1):
    for j in range(1,W+1):
        if s[i][j] == "#":
            if s[i-1][j]=="." and s[i][j-1]=="." and s[i+1][j]=="." and s[i][j+1]==".":
                print("No")
                exit()
print("Yes")


### FIXED CODE ###

H,W = map(int,input().split())
s = [["."]*(W+2)]+[["."]+list(input())+["."] for _ in range(H)]+[["."]*(W+2)]
#print(*s, sep="\n")
for i in range(1,H+1):
    for j in range(1,W+1):
        if s[i][j] == "#":
            if s[i-1][j]=="." and s[i][j-1]=="." and s[i+1][j]=="." and s[i][j+1]==".":
                print("No")
                exit()
print("Yes")
N, W = map(int, input().split())

import numpy as np
dp = np.zeros(W + 1, dtype='int64')

for i in range(1, N + 1):
    w, v = map(int, input().split())
    dp[w:W+1] = np.maximum(dp[w:W+1], dp[:W-w+1] + v)

print(dp[-1])


### FIXED CODE ###

N, W = map(int, input().split())

import numpy as np
MAX = 10**5 + 1
dp = [np.full(MAX, 10**13) for i in range(N + 1)]
dp[0][0] = 0

for i in range(1, N + 1):
    w, v = map(int, input().split())
    dp[i][:v] = dp[i-1][:v]
    dp[i][v:] = np.minimum(dp[i-1][v:], dp[i-1][:-v] + w)

ans = np.where(dp[N] <= W)[0].max()

print(ans)
# -*- coding: utf-8 -*-

import sys
import math

def main():
  argNum = int(sys.argv[1])
  print(int(math.pow(argNum,3)))

if __name__ == '__main__':
  main()

### FIXED CODE ###

# -*- coding: utf-8 -*-

import math

def main():
  N = float(input())
  print(int(math.pow(N,3)))

if __name__ == '__main__':
  main()
n=int(input())
if n in 7:
    print('Yes')
else:
    print('No')



### FIXED CODE ###

s=input()
num=s.count('7')
if num>0:
  print('Yes')
else:
  print('No')
import math
r=int(input())
print("{:0.6f} {:0.6f}".format(r**2*math.pi,r*2*math.pi))

### FIXED CODE ###

import math
r=float(input())
print("{:0.6f} {:0.6f}".format(r**2*math.pi,r*2*math.pi))
# A - Weather Prediction
S = str(input())

weather = ('Sunny', 'Cloudy', 'Rainy')
if S == weather[0]:
    print(weather[1])
elif S == weather[1]:
    print(weather[2])
elif S == weather[2]:
    print(weather[3])

### FIXED CODE ###

# A - Weather Prediction
S = str(input())

weather = ('Sunny', 'Cloudy', 'Rainy')
if S == weather[0]:
    print(weather[1])
elif S == weather[1]:
    print(weather[2])
elif S == weather[2]:
    print(weather[0])
4444
1111
aaaa
a
a
a
a
a
a


### FIXED CODE ###

x = list(map(lambda y: int(y),input().split(" ")))

if x[0]<9 and x[1]<9:
	print("Yay!")
else:
	print(":(")
import sys
input = sys.stdin.readline

A=int(input())
B=int(input())
C=int(input())
X=int(input())

ans = 0
for i in range(A+1):
  for j in range(B+1):
    if 0 <= (x - 500*i - 100*j) // 50 <= C:
      ans += 1
print(ans)      

### FIXED CODE ###

import sys
input = sys.stdin.readline

A=int(input())
B=int(input())
C=int(input())
X=int(input())

ans = 0
for i in range(A+1):
  for j in range(B+1):
    if 0 <= (X - 500*i - 100*j) // 50 <= C:
      ans += 1
print(ans)
#ABC132 = 2*2*3*11

n = int(input())
d = list(map(int,input().split()))
d.sort()
if len(d)%2 == 0:
    m = (d[(len(d)//2)-1]+d[len(d)//2])/2
else:
    m = d[(len(d)//2)]
ans = 0
p = 0
q = 0
d.sort()
for i in range(len(d)):
    if d[i]>=m:
        if d[i] == d[i+1]:
            ans += 0
            break
        else:
            p = d[i]
            q = d[i-1]
            break
print(p-q)

### FIXED CODE ###

n = int(input())
d = sorted(list(map(int,input().split())))
print(d[n//2]-d[n//2-1])
c11,c12,c13=input().split()
c21,c22,c23=input().split()
c31,c32,c33=input().split()
print(str(c11+c22+c33))

### FIXED CODE ###

a=str(input())
b=str(input())
c=str(input())
print(a[0]+b[1]+c[2])
from collections import Counter

N = int(input())
S = input()

r = S.count('R')
g = S.count('G')
b = S.count('B')

sum = r*g*b

for i in range(N):
    for j in range(i+1, N):
        k = 2 * j - i
        if not S[i] == S[j] and not S[j] == S[k] and not S[k] == S[i]:
            sum -= 1
print(sum)

### FIXED CODE ###

from collections import Counter

N = int(input())
S = input()

r = S.count('R')
g = S.count('G')
b = S.count('B')

sum = r*g*b

for i in range(N):
    for j in range(i+1, N):
        k = 2 * j - i
        if k > N - 1:
            break
        if not S[i] == S[j] and not S[j] == S[k] and not S[k] == S[i]:
            sum -= 1
print(sum)
def factorial(x):
  if x == 1: return 1
  else: return x*factorial(x-1)

n = int(input())
n_bikkuri = factorial(n)

total = 1

for i in range(2, n+1):
  n_b = n_bikkuri
  while(not n_b % i):
    total += 1
    n_b /= i

print(total)

### FIXED CODE ###

mod = 1000000000 + 7

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])
    if temp != 1:
        arr.append([temp, 1])
    if arr == []:
        arr.append([n, 1])
    return arr

n = int(input())
dat = [0] * 2000 # 約数として求められたある数の合計

# N! の各要素の素因数分解をする
res = 1
for i in range(1, n + 1):
    d = factorization(i)
    for j in range(len(d)):
        dat[d[j][0]] += d[j][1]

for i in range(2, n + 1):
    res *= (dat[i] + 1)
    res %= mod

print(res)
r=int(input())
print(r＊＊2)

### FIXED CODE ###

r=int(input())
print(r*r)
a = int(input())
b= int(input())
c = int(input())
d = int(input())
e = int(input())
l = [] 
for i in [a,b,c,d,e]:
    if i % 10 != 0: 
        l.append(i//10*10+10-i)
print(sum([a,b,c,d,e])+sum(sorted(l):-1]))

### FIXED CODE ###

a = int(input())
b= int(input())
c = int(input())
d = int(input())
e = int(input())
l = [] 
for i in [a,b,c,d,e]:
    if i % 10 != 0: 
        l.append(i//10*10+10-i)
print(sum([a,b,c,d,e])+sum(sorted(l)[:-1]))
ans = 0
count = 0


for i in S:
    if i =="A" or i == "C" or i == "T" or i == "G":
        count += 1
    else:
        ans = max(count, ans)
        count = 0
        
ans = max(count, ans)
print(ans)

### FIXED CODE ###

S = input()
ans = 0
count = 0


for i in S:
    if i =="A" or i == "C" or i == "T" or i == "G":
        count += 1
    else:
        ans = max(count, ans)
        count = 0
        
ans = max(count, ans)
print(ans)
s = input()
print(s.count(1))

### FIXED CODE ###

s = input()
print(s.count('1'))
n = int(input())
print(800 * n - (n // 15) * 200


### FIXED CODE ###

n = int(input())
print(800 * n - (n // 15) * 200)
x, y, z = map(int, input().split())
print(z + " " + x + " " + y)

### FIXED CODE ###

x, y, z = map(int, input().split())
print(z, end='')
print(" ", end='')
print(x, end='')
print(" ", end='')
print(y, end='')
print(sort(map(int,input().split())))

### FIXED CODE ###

print(*sorted(input().split()))
#!/usr/bin/env python3
import sys
from collections.abc import Iterable
from math import *
from itertools import *
from collections import *
from functools import *
from operator import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(N: int, W: int, w: "List[int]", v: "List[int]"):
    dp = [[float('inf')] * (N * 1000 + 1) for _ in range(N+1)]
    dp[0][0] = 0

    for i, (cw, cv) in enumerate(zip(w, v)):
        for j in range(N * 1000 + 1):
            dp[i+1][j] = dp[i][j]
            if 0 <= (j - cv) and (dp[i][j - cv] + cw) <= W:
                dp[i+1][j] = min(dp[i+1][j], dp[i][j - cv] +  cw)

    return max([cv for cv, cw in enumerate(dp[-1]) if isfinite(cw)])


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    w = [int()] * (N)  # type: "List[int]"
    v = [int()] * (N)  # type: "List[int]"
    for i in range(N):
        w[i] = int(next(tokens))
        v[i] = int(next(tokens))
    result = solve(N, W, w, v)
    if isinstance(result, Iterable) and not isinstance(result, str):
        result = '\n'.join([str(v) for v in result])
    print(result)

if __name__ == '__main__':
    main()

### FIXED CODE ###

#!/usr/bin/env python3
import sys
from math import *
from itertools import *
from collections import *
from functools import *
from operator import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(N: int, W: int, w: "List[int]", v: "List[int]"):
    dp = [[float('inf')] * (N * 1000 + 1) for _ in range(N+1)]
    dp[0][0] = 0

    for i, (cw, cv) in enumerate(zip(w, v)):
        for j in range(N * 1000 + 1):
            dp[i+1][j] = dp[i][j]
            if 0 <= (j - cv) and (dp[i][j - cv] + cw) <= W:
                dp[i+1][j] = min(dp[i+1][j], dp[i][j - cv] +  cw)

    return max([cv for cv, cw in enumerate(dp[-1]) if isfinite(cw)])


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    w = [int()] * (N)  # type: "List[int]"
    v = [int()] * (N)  # type: "List[int]"
    for i in range(N):
        w[i] = int(next(tokens))
        v[i] = int(next(tokens))
    result = solve(N, W, w, v)
    print(result)

if __name__ == '__main__':
    main()
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return input()
n,k=IL()
top=dict()
sub=[]
for i in range(n):
    t,d=IL()
    if t in top:
        sub.append(min(top[t],d))
        top[t]=max(top[t],d)
    else:
        top[t]=d

top=sorted(top.items(),key=lambda x:-x[1])
sub.sort(reverse=True)

rtop=[top[0][1]]
rsub=[sub[0]]
for i in range(1,len(top)):
    rtop.append(rtop[-1]+top[i][1])
for i in range(1,len(sub)):
    rsub.append(rsub[-1]+sub[i])

ans=0
for i in range(k):
    if i<len(rtop) and 0<=k-i-2<len(rsub):
        ans=max(ans,rtop[i]+rsub[k-i-2]+(i+1)**2)
print(ans)

### FIXED CODE ###

def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return input()
n,k=IL()
top=dict()
sub=[]
for i in range(n):
    t,d=IL()
    if t in top:
        sub.append(min(top[t],d))
        top[t]=max(top[t],d)
    else:
        top[t]=d

top=sorted(top.items(),key=lambda x:-x[1])
sub.sort(reverse=True)

rtop=[top[0][1]]
rsub=[0]
for i in range(1,len(top)):
    rtop.append(rtop[-1]+top[i][1])
for i in range(len(sub)):
    rsub.append(rsub[-1]+sub[i])

ans=0
for i in range(k):
    if i<len(rtop) and 0<=k-i-1<len(rsub):
        ans=max(ans,rtop[i]+rsub[k-i-1]+(i+1)**2)
print(ans)
W, H, x, y = map(int, input().split())
print(f"{W*H/2} {int(W==x*2 and H==y*2)}")

### FIXED CODE ###

W, H, x, y = map(int, input().split())
print(*[W*H/2, int(W==x*2 and H==y*2)])
n, m = map(int, input().split())
num = ['x'] * n
flag = 0

if n == 1:
    for i in range(m):
        s, c = map(int, input().split())
        if num[s-1] == 'x':
            num[s-1] = c
        else:
            if num[s-1] != c:
                print(-1)
                flag = 1
                break
    if flag == 0:
        print(num[s-1])

else:
    for i in range(m):
        s, c = map(int, input().split())
        if num[s-1] == 'x':
            num[s-1] = c
            if s == 1 and c == 0:
                print(-1)
                flag = 1
                break
                
        else:
            if num[s-1] != c:
                print(-1)
                flag = 1
                break
    if flag == 0:
        if num[0] == 'x':
            num[0] = 1
        for j in range(1, n):
            if num[j] == 'x':
                num[j] = 0
        str_num = map(str, num)
        print(''.join(str_num))

### FIXED CODE ###

n, m = map(int, input().split())
num = ['x'] * n
flag = 0

if n == 1:
    if m == 0:
        print(0)
    else:
        for i in range(m):
            s, c = map(int, input().split())
            if num[s-1] == 'x':
                num[s-1] = c
            else:
                if num[s-1] != c:
                    print(-1)
                    flag = 1
                    break
        if flag == 0:
            print(num[s-1])

else:
    for i in range(m):
        s, c = map(int, input().split())
        if num[s-1] == 'x':
            num[s-1] = c
            if s == 1 and c == 0:
                print(-1)
                flag = 1
                break
                
        else:
            if num[s-1] != c:
                print(-1)
                flag = 1
                break
    if flag == 0:
        if num[0] == 'x':
            num[0] = 1
        for j in range(1, n):
            if num[j] == 'x':
                num[j] = 0 
        str_num = map(str, num)
        print(''.join(str_num))
N, M = list(map(int, input().split(" ")))
list_a = list(map(int, input().split(" ")))

##最大公約数を求める

def gcd(a, b) :
  if(b==0) :
    return a
  else :
    return gcd(b, a%b)
   
##最小公倍数を求める
def lcm(a, b) :
  return a * b / gcd(a, b)
  
##複数個の整数の最小公倍数を求める
def lcm_multi(l) :
  if(len(l) < 2) :
    return l[0]
  res = lcm(l[0], l[1])
  
  for i in range(2, N) :
    res = lcm(l[i], res)
    
  return res

ans = 0
lcm_m = lcm_multi(list_a)
if(M-lcm_m/2 < 0) :
  print(0)
else :
  print(int((M-lcm_m/2) / lcm_m) + 1)


### FIXED CODE ###

N, M = list(map(int, input().split(" ")))
list_a = list(map(int, input().split(" ")))

##半公倍数が存在するかチェック
def check_exist(l) :
  if(len(l) == 1) :
    return True
  while(True) :
    flag = l[0] % 2
    for x in l[1:] :
      if(x % 2 != flag) :
        return False
    if(flag == 0) :
      l = list(map(lambda x: int(x/2), l))
    else :
      return True
    

##最大公約数を求める

def gcd(a, b) :
  if(b==0) :
    return a
  else :
    return gcd(b, a%b)
   
##最小公倍数を求める
def lcm(a, b) :
  cd = gcd(a, b)
  return (a / cd) * b
  
##複数個の整数の最小公倍数を求める
def lcm_multi(l) :
  cm = 1
  for x in l :
    cm = lcm(x, cm)
    if(cm > 4 * M) :
      print(0)
      exit()
    
  return cm

if(not(check_exist(list_a))) :
  print(0)
  exit()

## 1/2の公倍数
lcm_m = lcm_multi(list(map(lambda x: int(x/2), list_a)))

if(M-lcm_m < 0) :
  print(0)
else :
  print(int((M-lcm_m) / (2*lcm_m)) + 1)
n, a, b = map(int, input().split())
mod = 10**9+7
ans = 2**n-1%mod
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

N = 10**4
g1 = [1, 1] 
g2 = [1, 1] 
inverse = [0, 1] 

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )
a = 0
a += cmb(n,b,mod) 
a += cmb(n,b,mod) 
print((ans-a)%mod)

### FIXED CODE ###

n, a, b = map(int, input().split())
m = 10**9+7
def cmb(r):
    N = 1
    R = 1
    for i in range(r):
        N = N*(n - i) % m
        R = R*(i+1) % m
    return N*pow(R, m-2, m)%m

ans = (pow(2, n, m) - ((cmb(a) + cmb(b) + 1)%m))%m
print(ans)
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 29 14:29:48 2019

@author: re
"""

A = input()
B = input()
A = int(A)
B = int(B)


K = (A+B) / 2
K = int(K)

if abs(A-K) == abs(B-K):
    print(K)
else:
    print("IMPOSSIBLE")
    

### FIXED CODE ###

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

if (A+B) % 2 == 0 and A != B:
    print((A+B)//2)
else:
    print("IMPOSSIBLE")
string = input()
num = int(input())

count=1
out =''
for s in string:
    if count==num:
        out=out+s
        count=1
    count+1

### FIXED CODE ###

l = input().split()
if int(l[0])+int(l[1])==15:
    print('+')
elif int(l[0])*int(l[1]) ==15:
    print('*')
else:
    print('x')
import math
n=input()
s=input()

def f(b,n):
	if n<b:
		return n
	elif n>=b:
		return f(b, math.floor(n/b))+n%b

if s==1:
	print n
	quit()
if n==1:
	print -1
	quit()



for i in range(2,s+1):
	if f(i,n)==s:
		print i
		quit()
else:
	print -1

### FIXED CODE ###

import math
n=input()
s=input()

def f(b,n):
	if n<b:
		return n
	elif n>=b:
		return f(b, math.floor(n/b))+n%b

if s==n:
	print n+1
	quit()


# 2 <= b <= sqrt(n)
n_sqrt=int(math.sqrt(n))
for i in range(2, n_sqrt+1):
	if f(i,n)==s:
		print i
		quit()



# sqrt(n) < b <= n
# yakusuu
l=[]
for i in range(1, n_sqrt+1):
	if (n-s)%i==0:
		l.append(i)
		l.append((n-s)/i)
l.sort()

for i in l:
	b=i+1
	if b**2<=n:
		continue
	p=n/b
	q=n%b
	if p+q==s:
		print b
		quit()

print -1
x=input()
print(x*x*x)





### FIXED CODE ###

x=input()
y=int(x)
print(y*y*y)