Harryxun/stf_run huggingface dataset:
def ncr(x,y):
	ans=1
	q=x-y
	while x>y:
		ans*=x
		x=x-1
	
	while q>1:
		ans=ans/q
		q=q-1
	
	return ans

x=input().split()
n=int(x[0])
a=int(x[1])
b=int(x[2])
v=[0]*n
x = input().split()
ind=0
M={1:0}
M2={1:0}
for i in x:
	v[ind]=int(i)
	if int(i) in M:
		M[v[ind]]+=1
	else:
		M[v[ind]]=1
	ind+=1
v.sort(reverse=True)

cnt=0
ind=0
m=0
while cnt<a:
	cnt+=1
	m=((cnt-1)*m+v[ind])/cnt
	if v[ind] in M2:
		M2[v[ind]]+=1
	else:
		M2[v[ind]]=1
	ind+=1
while cnt<b:
	if (cnt*m+v[ind])/(cnt+1)<m:
		break
	else:
		cnt+=1;
		m=((cnt-1)*m+v[ind])/cnt
		if v[ind] in M2:
			M2[v[ind]]+=1
		else:
			M2[v[ind]]=1
		ind+=1
print(m)
maxw=cnt;
ways=0;
for i in range(cnt,a-1,-1):
	if v[ind] not in M2:
			M2[v[ind]]=0
	if v[ind-1] not in M:
			M[v[ind-1]]=0
	ways+=ncr(M[v[ind-1]],M2[v[ind-1]])
	
	M2[v[ind]]-=1

print(int(ways))
	

### FIXED CODE ###

import decimal
def ncr(x,y):
	ans=1
	q=x-y
	while x>y:
		ans*=x
		x=x-1
	
	while q>1:
		ans=ans/q
		q=q-1
	
	return ans

x=input().split()
n=int(x[0])
a=int(x[1])
b=int(x[2])
v=[0]*n
x = input().split()
ind=0
M={1:0}
M2={1:0}
for i in x:
	v[ind]=int(i)
	if int(i) in M:
		M[v[ind]]+=1
	else:
		M[v[ind]]=1
	ind+=1
v.sort(reverse=True)

cnt=0
ind=0
m=0
while cnt<a:
	cnt+=1
	m=decimal.Decimal((cnt-1)*m+v[ind])/decimal.Decimal(cnt)
	if v[ind] in M2:
		M2[v[ind]]+=1
	else:
		M2[v[ind]]=1
	ind+=1
while cnt<b:
	if (cnt*m+v[ind])/(cnt+1)<m:
		break
	else:
		cnt+=1;
		if v[ind] in M2:
			M2[v[ind]]+=1
		else:
			M2[v[ind]]=1
		ind+=1
print(m)
maxw=cnt;
ways=0;
for i in range(int(cnt),a-1,-1):
	if v[ind-1] not in M2:
			M2[v[ind]]=0
	if v[ind-1] not in M:
			M[v[ind-1]]=0
	#print(M[v[ind-1]],M2[v[ind-1]])
	ways+=ncr(M[v[ind-1]],M2[v[ind-1]])
	
	M2[v[ind-1]]-=1

print(round(ways))
apple,apple_piece = map(int(input(),split())

apple_cut = apple * 3

apple_pie = (apple_cut + apple_piece) /2
                 
print(apple_pie)

### FIXED CODE ###

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

apple_cut = A * 3

apple_pie = (apple_cut + P) /2
                 
print(int(apple_pie))
import sys

n = input()
n= int(n)
ls = input().split()
lsnum = list(map(int,ls))
ma = max(lsnum)

minvalue = 100000000
ans = -1
for num in lsnum:
    if num == ma:
        continue
    value = abs(ma//2-num)
    if minvalue >= value:
        minvalue = value
        ans = [ma, num]
print (ans[0], ans[1])


### FIXED CODE ###

import sys

n = input()
n= int(n)
ls = input().split()
lsnum = list(map(int,ls))
ma = max(lsnum)

minvalue = 10000000000
ans = -1
for num in lsnum:
    if num == ma:
        continue
    value = abs(ma-num*2)
    if minvalue >= value:
        minvalue = value
        ans = [ma, num]
print (ans[0], ans[1])
import math

s = list(input())
t = list(input())
s.reverse()
s=''.join(s)
t.reverse()
t=''.join(t)
n = s.index(t[0])
res = len(t)
num =0
while len(s)>=len(t):
    if len(s)<=len(t) and s[0] != t[0]:break
    n = s.index(t[0])
    for i in range(len(t)):
        if t[i]!=s[i+n]:
            num+=1
    res = min(res,num)
    s = s[n+len(t):]
print(res)

### FIXED CODE ###

import math

s = input()
t = input()
res = len(t)
num =0
for i in range(len(s)-len(t)+1):
    for j in range(len(t)):
        if t[j]!=s[i+j]:
            num+=1
    res = min(res,num)
    num = 0
print(res)
s = input()
print("Yes" if s[::-1]=s else "No")

### FIXED CODE ###

s = input()
print("Yes" if s[::-1]==s else "No")
h, w = map(int, input().split())
field = [list(input()) for _ in range(h)]
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
count = 0
for i in range(h):
    for j in range(w):
        if field[i][j] == '#':
            count = 0
            for d in range(4):
                if 0<=i+dx[d]<w and 0<=j+dy[d]<h:
                    count += 1 if field[i+dx[d]][j+dy[d]]=='#' else 0

            if count<1:
                print('No')
                exit()
print('Yes')


### FIXED CODE ###

h, w = map(int, input().split())
field = [list(input()) for _ in range(h)]
dx = [0, 1, 0, -1]
dy = [-1, 0, 1, 0]
count = 0
for i in range(h):
    for j in range(w):
        if field[i][j] == '#':
            count = 0
            for d in range(4):
                if 0<=i+dy[d]<h and 0<=j+dx[d]<w:
                    count += 1 if field[i+dy[d]][j+dx[d]]=='#' else 0

            if count<1:
                print('No')
                exit()
print('Yes')
while True:
    x,y = map(int, input().split())
    if x == 0 and y == 0:
        break;
    elif x <= y:
        print (x,y)
    else x > y
        print (y,x)

### FIXED CODE ###

while True:
    x,y = map(int, input().split())
    if x == 0 and y == 0 :
        break
    elif x <= y :
        print (x,y)
    else :
        print (y,x)
# coding: utf-8
from math import gcd

def getPrime(x):
    num_list=[i for i in range(2,x+1)]
    prime_list=[]
    D=[x+1 for i in range(x+1)]
    
    while num_list[0]<x**(1/2):
        p=num_list.pop(0)
        prime_list.append(p)
        for i in range(len(num_list)):
            if num_list[i]%p==0:
                if D[num_list[i]]>p:
                    D[num_list[i]]=p
        num_list = [e for e in num_list if e % p != 0]
    
    prime_list = prime_list + num_list
    for i in range(len(prime_list)):
        D[prime_list[i]] = prime_list[i]
    D[0]=1
    D[1]=1
    return D

N = int(input())
A = list(map(int,input().split()))
D = getPrime(max(A))

pc_flg = True

x = A[0]
for i in range(N):
    x = gcd(x,A[i])

prime_flg=[False for i in range(10**6+1)]

for i in range(N):
    num = A[i]
    primes = []
    while True:
        p = D[num]
        num = num//p
        primes.append(p)
        if num == 1:
            break
    for j in set(primes):
        if not(prime_flg[j]):
            prime_flg[j] = True
        else:
            if j != 1:
                pc_flg = False

if pc_flg:
    print("pairwise coprime")
elif x==1:
    print("setwise coprime")
else:
    print("not coprime")

### FIXED CODE ###

# coding: utf-8
from math import gcd

def getPrime(x):
    num_list=[i for i in range(2,x+1)]
    prime_list=[]
    D=[x+1 for i in range(x+1)]
    
    while num_list[0]<x**(1/2):
        p=num_list.pop(0)
        prime_list.append(p)
        for i in range(len(num_list)):
            if num_list[i]%p==0:
                if D[num_list[i]]>p:
                    D[num_list[i]]=p
        num_list = [e for e in num_list if e % p != 0]
    
    prime_list = prime_list + num_list
    for i in range(len(prime_list)):
        D[prime_list[i]] = prime_list[i]
    D[0]=1
    D[1]=1
    return D

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

if max(A) == 1:
    print("pairwise coprime")
    exit()

D = getPrime(max(A))

pc_flg = True

x = A[0]
for i in range(N):
    x = gcd(x,A[i])

prime_flg=[False for i in range(10**6+1)]

for i in range(N):
    num = A[i]
    primes = []
    while True:
        p = D[num]
        num = num//p
        primes.append(p)
        if num == 1:
            break
    for j in set(primes):
        if not(prime_flg[j]):
            prime_flg[j] = True
        else:
            if j != 1:
                pc_flg = False


if pc_flg:
    print("pairwise coprime")
elif x==1:
    print("setwise coprime")
else:
    print("not coprime")
String s
String t
int x
int i = 0
s = input()
t = input()
for(i in range(len(s)))
  if(s[i] == t[i])
    x = x + 1
  i = i + 1
print(x)

### FIXED CODE ###

x = 0
s = input()
t = input()
y = len(s)
for i in range(y):
  if s[i] != t[i]:
    x += 1
  i += 1
print(x)
N = int( input())
A = [ int( input()) for _ in range(N)]
now = 0
ans = 0
if A[0] != 0:
    ans = -1
else:
   for i in range(1,N):
       a = A[i]
       # if a > i:
       #     ans = -1
       #     break
       #el
       if now + 1 == a:
           ans += 1
           now += 1
       elif now >= a:
           ans += a
           now = a
       else:
           ans = -1
           break
print(ans)


### FIXED CODE ###

a, b, c, k = map( int, input().split())
if k%2 == 0:
    print(a-b)
else:
    print(b-a)
import numpy as np
A, B = map(int, input().split())
print(np.gcd(A, B))

### FIXED CODE ###

from fractions import gcd
A, B = map(int, input().split())
print((A*B)//gcd(A, B))
N, M = map(int, input().split())
#N = 1
#M = 1
l1 = []
l2 = []
ans = 0
rest = M
for i in range(N):
	temp1, temp2 = map(int, input().split())
	#temp1 = 1
	#temp2 = 1
	l1.append(temp1)
	l2.append(temp2)

while True:
	min_index = l1.index(min(l1))
	if(rest >= l2[min_index])
		ans += (min(l1) * l2[min_index])
		rest -= l2[min_index]
	else :
		ans += (min(l1) * rest)
		break
	l1.pop(min_index)

print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
X = []
for i in range(N):
    X.append(list(map(int, input().split())))
X.sort(key=lambda x: x[0])
i = 0
num = 0
ans = 0
while i <= N - 1:
    num += X[i][1]
    ans += X[i][0] * X[i][1]
    if num > M:
        ans -= X[i][0] * (num - M)
        break
    i += 1
print(ans)
a = input("aの値を入力")
b = input("bの値を入力")
if (a % 2 == 0 or b % 2 == 0):
  print("Even")
else:
  print("Odd")

### FIXED CODE ###

a,b=map(int,input().split())
if a * b % 2 == 0:
  print("Even")
else:
  print("Odd")
a,b,c = map(int,input().split())
if 4*a*b < c**2 + (a+b)**2 - 2*(a+b)*c
    print('Yes')
else:
    print('No')

### FIXED CODE ###

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

if a+b >= c:
    print('No')
elif 4*a*b < c**2 + (a+b)**2 - 2*(a+b)*c:
    print('Yes')
else:
    print('No')
N,M=map(int,input().split())
P=[[] for i in range(N+1)]
Y=[]
id=[]
for i in range(M):
    a,b=map(int,input().split())
    P[a].append(b)
    Y.append(b)
for i in range(N+1):
    P[i].sort()
for i in range(1,N+1):
    j=1
    for p in P[i]:
        id[Y.index(p)]=str(i*1000000+j)
        j+=1
for i in range(M):
    print(id[i].zfill(12))


### FIXED CODE ###

N,M=map(int,input().split())
P=[[] for i in range(M)]
Y=[1 for i in range(N+1)]
for i in range(M):
    a,b=map(int,input().split())
    P[i].append(i)
    P[i].append(a)
    P[i].append(b)
P.sort(key=lambda x:x[2])
for i in range(M):
    P[i].append(str(P[i][1]*1000000+Y[P[i][1]]))
    Y[P[i][1]]+=1
P.sort(key=lambda x:x[0])
for i in range(M):
    print(P[i][3].zfill(12))
n, k = map(int, input().split())
a = list(map(int, input().split()))

def check(t):
    ans = 0
    for ai in a:
        if ai > t:
            ans += ai // t
    return ans <= k

l = 0
r = 10 ** 9 + 1

while r - l > 1:
    mid = (r + l) // 2
    if check(mid):
        r = mid
    else:
        l = mid

if check(l):
    print(l)
else:
    print(r)



### FIXED CODE ###

import sys

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

if k == 0:
    print(max(a))
    sys.exit()

def check(t):
    if t == 0:
        return False
    ans = 0
    for ai in a:
        if ai > t:
            ans += ai // t
    return ans <= k

l = 0
r = 10 ** 9 + 1

while r - l > 1:
    mid = (r + l) // 2
    if check(mid):
        r = mid
    else:
        l = mid

if check(l):
    print(l)
else:
    print(r)
N, M = map(int, input().split())
A = list(map(int, input().split()))
A = sorted(A, reverse = True)
c = {}
for key in A:
    if key == 1:
        c[key] = 2
    elif key in [2, 3, 5]:
        c[key] = 5
    elif key == 4:
        c[key] = 4
    elif key in [6, 9]:
        c[key] = 6
    elif key == 7:
        c[key] = 3
    else:
        c[key] = 7

dp = [-1e9] * (N+1)
dp[0] = 0
for i in range(1, N+1):
    for key in c:
        if dp[i-c[key]] >= 0:
            dp[i] = max(dp[i-c[key]] + 1, dp[i])

K = N
while (K > 0):
    for key in c:
        if dp[K - c[key]] == dp[K] - 1:
            print(key, end = "")
            K -= c[key]
            break
print()

### FIXED CODE ###

N, M = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse = True)
x = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
dp = [0 for i in range(N+1)]
INF = float('inf')
for i in range(1, N+1):
    t = -INF
    for a in A:
        if i >= x[a]:
            t = max(dp[i-x[a]] + 1, t)
    dp[i] = t

K = N
k = dp[N]
ans = ""
while k > 0:
    for a in A:
        xa = x[a]
        if K >= xa and k == dp[K-xa] + 1:
            ans += str(a)
            K -= xa
            k -= 1
            break
print(ans)
from fractions import gcd
from functools import reduce

N, M = map(int, input().split())
*a, = map(int, input().split())
lcm = reduce(lambda x,y:x*y//gcd(x,y), a)

m = 10**9
for i in map(lambda x:lcm//x, a):
    if i%2==0:
        print(0)
        break
    m = min(m, i)
else:
    if m==1:
        start = int(lcm*1.5)
    else:
        start = int(lcm*0.5)

    print((M-start)//lcm+1)

### FIXED CODE ###

from fractions import gcd
from functools import reduce

N, M = map(int, input().split())
*a, = map(int, input().split())
lcm = reduce(lambda x,y:x*y//gcd(x,y), a)

for i in map(lambda x:lcm//x, a):
    if i%2==0:
        print(0)
        break
else:
    start = lcm//2
    print((M-start)//lcm+1)
while 1:
	n,m = map(int,raw_input().split())
	if n == 0: break
	p = map(int,raw_input().split())
	sp = set()
	for pi in p: sp |= set([pi*j for j in range(1,n/pi+1)])
	print (n*(n+1)/2-sum(sp))*1.0/(n-len(sp)) if n-len(sp) > 0 else 0

### FIXED CODE ###

while 1:
	n,m = map(int,raw_input().split())
	if n == 0: break
	p = min(map(int,raw_input().split()))
	print n/2.0 if p > 1 else 0.0
a=input()
if a<=1199:
  print("ABC")
elif a<=2799:
  print("ARC")
else:
  print("AGC")

### FIXED CODE ###

a=input()
if int(a)<=1199:
  print("ABC")
elif int(a)<=2799:
  print("ARC")
else:
  print("AGC")
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

n = int(input)
ans = int(input)
for i in range(n-1):
  tmp = int(input)
  ans = lcm(ans,tmp)
  
print(ans)

### FIXED CODE ###

from fractions import gcd

def lcm(x, y):
    return (x*y) // gcd(x, y)

def getN():
    return int(input())
# print(lcm(10, 20))

n = getN()
ans = 1
for i in range(n):
    t = getN()
    ans = lcm(ans, t)

print(ans)
class UnionFind:
    """
    Disjoint sets
    """

    def __init__(self, size):
        # 負の値はルート (集合の代表) で集合の個数
        # 正の値は次の要素を表す
        self.size = size
        self.parent = [-1] * size
        self.group_count = size

    def find(self, x):
        """
        xを含む集合の代表を求める
        """
        if self.parent[x] < 0:
            return x
        root = self.find(self.parent[x])
        self.parent[x] = root
        return root

    def union(self, x, y):
        """
        xを含む集合とyを含む集合を併合する
        """
        root_x = self.find(x)
        root_y = self.find(y)
        if root_x != root_y:
            if self.parent[root_x] >= self.parent[root_y]:
                self.parent[root_x] += self.parent[root_y]
                self.parent[root_y] = root_x
            else:
                self.parent[root_y] += self.parent[root_x]
                self.parent[root_x] = root_y
            self.group_count -= 1
    def get_size(self, x):
        return -self.parent[self.find(x)]



n,m = map(int, input().split())
connected = [0]*n
bs = []
for i in range(m):
    a,b = map(int, input().split())
    bs.append((a-1,b-1))
bs.reverse()

uf = UnionFind(n)

res  = []
fuben = n*(n-1)//2
for a,b in bs:
    res.append(fuben)
    if uf.find(a) == uf.find(b):
        pass
    else:
        fuben -= uf.get_size(a) * uf.get_size(b)
    uf.union(a,b)

res.reverse()
for v in res:
    print(v)

### FIXED CODE ###

import sys
sys.setrecursionlimit(100010)
class UnionFind:
    """
    Disjoint sets
    """

    def __init__(self, size):
        # 負の値はルート (集合の代表) で集合の個数
        # 正の値は次の要素を表す
        self.size = size
        self.parent = [-1] * size

    def find(self, x):
        """
        xを含む集合の代表を求める
        """
        if self.parent[x] < 0:
            return x
        root = self.find(self.parent[x])
        self.parent[x] = root
        return root

    def union(self, x, y):
        """
        xを含む集合とyを含む集合を併合する
        """
        root_x = self.find(x)
        root_y = self.find(y)
        if root_x != root_y:
            if self.parent[root_x] >= self.parent[root_y]:
                self.parent[root_x] += self.parent[root_y]
                self.parent[root_y] = root_x
            else:
                self.parent[root_y] += self.parent[root_x]
                self.parent[root_x] = root_y

    def get_size(self, x):
        return -self.parent[self.find(x)]



n,m = map(int, input().split())
bs = []
for i in range(m):
    a,b = map(int, input().split())
    bs.append((a-1,b-1))

uf = UnionFind(n)

res  = []
fuben = n*(n-1)//2
for a,b in bs[::-1]:
    res.append(fuben)
    if uf.find(a) != uf.find(b):
        fuben -= uf.get_size(a) * uf.get_size(b)
    uf.union(a,b)

for v in res[::-1]:
    print(v)
N = int(input())
A = [(int(a), i) for i, a in enumerate(input().split())]
A = sorted(A, reverse=True)

memo = {}

def solve(i, l, r):
    if i==N: return 0
    a, loc = A[i]
    score_l = a*abs(l-loc) + solve(i+1, l+1, r)
    score_r = a*abs(r-loc) + solve(i+1, l, r-1)
    retval = max(score_l, score_r)
    key = (i,l,r)
    if key not in memo: memo[key]=retval
    return retval
    
print(solve(0, 0, N-1))


### FIXED CODE ###

import sys
sys.setrecursionlimit(5000)

N = int(input())
A = [(int(a), i) for i, a in enumerate(input().split())]
A = sorted(A, reverse=True)

memo = {}

def solve(i, l, r):
    if i==N: return 0

    key = l*N+r
    if key in memo: return memo[key]
    
    a, loc = A[i]
    score_l = a*abs(l-loc) + solve(i+1, l+1, r)
    score_r = a*abs(r-loc) + solve(i+1, l, r-1)
    retval = max(score_l, score_r)
    memo[key]=retval
    
    return retval
    
print(solve(0, 0, N-1))
from collections import deque

n = int(input())
x = eval('0b' + input())

memo = {0: 0}

def solve(X):
    x = X
    stack = deque([])
    while x:
        if x in memo:
            break
        stack.append(x)
        x = x % bin(x).count("1")
    cnt = memo[x] + 1
    while stack:
        x = stack.pop()
        memo[x] = cnt
        cnt += 1
    return cnt - 1



ans = []
px = bin(x).count("1")

for i in range(n):
    y = 0
    py = px
    if x & (1 << i):
        y = x - 2 ** i
        py -= 1
    else:
        y= x + 2 ** i
        py += 1
    ans.append(solve(y%py)+1)

for ansi in reversed(ans):
    print(ansi)


    

        


### FIXED CODE ###

from collections import deque

n = int(input())
x = input()

memo = {0: 0}

def solve(X):
    x = X
    stack = deque([])
    while x:
        if x in memo:
            break
        stack.append(x)
        x = x % bin(x).count("1")
    cnt = memo[x] + 1
    while stack:
        x = stack.pop()
        memo[x] = cnt
        cnt += 1
    return cnt - 1



ans = []
px = x.count("1")

memo1 = [1 % (px - 1)] if px > 1 else []
memo2 = [1 % (px + 1)]
x1 = 0
x2 = 0

for i in range(n):
    if px > 1:
        memo1.append(memo1[-1] * 2 % (px-1))
    memo2.append(memo2[-1] * 2 % (px+1))

for i in range(n):
    if x[-i-1] == '1':
        if px > 1:
            x1 += memo1[i]
            x1 %= (px-1)
        x2 += memo2[i]
        x1 %= (px+1)

for i in range(n):
    if x[-i-1] == "1":
        if px > 1:
            ans.append(solve((x1-memo1[i])%(px-1)) + 1)
        else:
            ans.append(0)
    else:
        ans.append(solve((x2+memo2[i])%(px+1)) + 1)


for ansi in reversed(ans):
    print(ansi)
A, B, C = map(int, input().split())
K= int(input()) 
 
 
if (B**K>A)&(C>B):
  print("Yes")
elif (B**(K-1)>A)&(C>B**1) :
  print("Yes")
elif (B**(K-2)>A)&(C>B**2) :
  print("Yes")
elif (B**(K-3)>A)&(C>B**3) :
  print("Yes")
elif (B**(K-4)>A)&(C>B**4) :
  print("Yes")
elif (B**(K-5)>A)&(C>B**5) :
  print("Yes")
elif (B**(K-6)>A)&(C>B**6) :
  print("Yes")
else :
  print("No")

### FIXED CODE ###

s = int(input()) 
 
if 400 <= s <= 599:
  print("8")
elif  600 <= s <=799:
        print("7")
elif  800 <= s <=999:
        print("6")
elif  1000 <= s <=1199:
        print("5")
elif  1200 <= s <=1399:
        print("4")
elif  1400 <= s <=1599:
        print("3")
elif  1600 <= s <=1799:
        print("2")
elif  1800 <= s <=1999:
        print("1")
import math


def main():
    a = list(input())
    b = list(input())
    dica = {}
    dicb = {}
    dif = 0
    alpha = list("abcdefghijklmnopqrstuvwxyz")
    for aa,bb in zip(a,b):
        if aa != bb:
            if bb not in dica:  
                dica[bb] = aa
            if aa not in dicb:
                dicb[aa] =bb
        
            if dica[bb] != aa or dicb[aa] != bb:            
                print("No")
                return 0
        
            # if aa not in dica:
            #     dica[aa] = bb
            # if bb not in dicb:
            #     dicb[bb] = aa
            
    if dica[bb] != aa or dicb[aa] != bb:            
                print("No")
                return 0
            
    print("Yes")
    
    # for c in alpha:
    #     dica[c] = 0
    #     dicb[c] = 0
    # for temp in a:
    #     dica[temp] +=1
    # for temp in b:
    #     dicb[temp] +=1
    # for c in alpha:
    #     dif += (dica[c]-dicb[c])
    
    

if __name__ == '__main__':
    main()


### FIXED CODE ###

s1 = input()
s2 = input()
di1 = {} #s1 → s2 の対応表
di2 = {} #s2 → s1 の対応表

ans = "Yes"
for c1,c2 in zip(s1,s2):
    if c1 not in di1:
        di1[c1] = c2
    else:
        if di1[c1] != c2:
            ans = "No"

    if c2 not in di2:
        di2[c2] = c1
    else:
        if di2[c2] != c1:
            ans = "No"

print(ans)
def(x)
 if x == 1
  return 0
return 1

### FIXED CODE ###

x = int ( input() )
if x==1:
  print (0)
  
else :
  print (1)
from collections import deque
n,k=[int(i) for i in input().split()]
D=deque(int(i) for i in input().split()

### FIXED CODE ###

#デックをインポート
from collections import deque

#前準備
n,k=[int(i) for i in input().split()]

#デックを用意
D=deque()
h=[int(i) for i in input().split()]
for i in h:
    D.append(i)   
    
#答え
maxnum=0

#繰り返す単位
times=min(n,k)

#aとbの操作の合計のlimitを設定
for limit in range(times+1):
#     print(D)
    
    #aの操作を決定
    for a in range(limit+1):
        get=[]
        Dcopy=deque()
        for i in range(n):
            Dcopy.append(D[i])
        b=limit-a
        for i in range(a):
            get.append(Dcopy.popleft())
        for i in range(b):
            get.append(Dcopy.pop())
        get.sort(reverse=True)
#         print(get)
        for i in range(k-limit):
            if len(get)==0:
                break
            if get[-1]>=0:
                break
            get.pop()
        sumnum=0
        for i in get:
            sumnum+=i
        if sumnum>maxnum:
            maxnum=sumnum
            
#         print(a,b,Dcopy,get,sumnum)
print(maxnum)
n = int(input())
l = list(map(int,input().split()))
i = 0
c = 0
l2 = []
while i < n-1:
    if l[i] >= l[i+1]:
        c = c+1
        i = i+1
    else :
        l2.append(c)
        c = 0
        i = i+1
print(max(l2))

### FIXED CODE ###

n = int(input())
l = list(map(int,input().split()))
i = 0
c = 0
l2 = []
while i < n-1:
    if l[i] >= l[i+1]:
        c = c+1
        i = i+1
    else :
        l2.append(c)
        c = 0
        i = i+1
l2.append(c)
print(max(l2))
S = input()
MOD = 10**9 + 7
dp = [0] * 3  # num of ..A, ..AB, ..ABC
pp = [0] * 3
nq = 0
for s in S:
    pp = dp
    dp = pp.copy()
    if s == 'A':
        dp[0] += pow(3, nq, MOD)
    elif s == 'B':
        dp[1] += pp[0]
    elif s == 'C':
        dp[2] += pp[1]
    else:
        dp[0] += pp[0]*2 + pow(3, nq, MOD)
        dp[1] += pp[1]*2 + pp[0]
        dp[2] += pp[2]*2 + pp[1]
        nq += 1
    dp[0] %= MOD
    dp[1] %= MOD
    dp[2] %= MOD
print(dp[2])

### FIXED CODE ###

S = input()
MOD = 10**9 + 7
dp = [0] * 3  # num of ..A, ..AB, ..ABC
pp = [0] * 3
nq = 0
for s in S:
    pp = dp
    dp = pp.copy()
    if s == 'A':
        dp[0] += pow(3, nq, MOD)
    elif s == 'B':
        dp[1] += pp[0]
    elif s == 'C':
        dp[2] += pp[1]
    else:
        dp[0] += pp[0]*2 + pow(3, nq, MOD)
        dp[1] += pp[1]*2 + pp[0]
        dp[2] += pp[2]*2 + pp[1]
        nq += 1
    dp[0] %= MOD
    dp[1] %= MOD
    dp[2] %= MOD
print(dp[2])
N=int(input())
if N==1:
  print("Hello World")
else:
  A,B=map(int,input().split())
  print(A+B)
  

### FIXED CODE ###

N=int(input())
if N==1:
  print("Hello World")
else:
  A=int(input())
  B=int(input())
  print(A+B)