Harryxun/stf_run huggingface dataset:
import sympy
N = int(input())
A = list(map(int, input().split()))

lcm = sympy.gcd(A)
print(lcm)

### FIXED CODE ###

import fractions
from functools import reduce
N = int(input())
A = list(map(int, input().split()))
gcd = reduce(fractions.gcd, A)
print(gcd)
m=int(input())
n=int(input())
multi=(m*n)-(m+n)+1
print(multi)
print()

### FIXED CODE ###

n,m=input().split(" ")
m=int(m)
n=int(n)
multi=(m*n)-(m+n)+1
print(multi)
print()
A = int(input())
B = int(input())
C = int(input())

if (A==B==C or  A!=C and B !=C):
  print("No")

else:
  print("Yes")


### FIXED CODE ###

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

if (A==B==C or  A!=C and A!=B and B!=C):
  print("No")

else:
  print("Yes")
K = int(input())
S = input()
s = len(S)
L = []

mod = 10 ** 9 + 7
N = 10 ** 6
fac = [1, 1]
finv = [1, 1]
inv = [0, 1]

def cmb(n, r):
  return fac[n] * ( finv[r] * finv[n-r] % mod ) % mod
 
for i in range(2, N + 1):
  fac.append( ( fac[-1] * i ) % mod )
  inv.append( mod - ( inv[mod % i] * (mod // i) % mod ) )
  finv.append( finv[-1] * inv[-1]  % mod )

for i in range(K+1):
  L.append( cmb(i+s-1, s-1) * pow(25, i, mod) % mod )

ans = []

for i, x in enumerate(L):
  if i == 0:
    ans.append(x)
  else:
    ans.append( ( ans[i-1]*26%mod + x ) % mod )

print(ans[K])

### FIXED CODE ###

K = int(input())
S = input()
s = len(S)
L = []

mod = 10 ** 9 + 7
N = 2 * 10**6
fac = [1, 1]
finv = [1, 1]
inv = [0, 1]

def cmb(n, r):
  return fac[n] * ( finv[r] * finv[n-r] % mod ) % mod
 
for i in range(2, N + 1):
  fac.append( ( fac[-1] * i ) % mod )
  inv.append( mod - ( inv[mod % i] * (mod // i) % mod ) )
  finv.append( finv[-1] * inv[-1]  % mod )

for i in range(K+1):
  L.append( cmb(i+s-1, s-1) * pow(25, i, mod) % mod )

ans = []

for i, x in enumerate(L):
  if i == 0:
    ans.append(x)
  else:
    ans.append( ( ans[i-1]*26%mod + x ) % mod )

print(ans[K])
#%%
n = int(input())
a = list(map(int ,input().split()))

a.sort(reverse=True)
ans = []
for i in range(n):
    if i == 0:
        tmp = a[i]
    elif 1 <= i < n - 1:
        if a[i] > 0:
            a[-1] -= a[i]
            ans.append(str(a[-1]) + ' ' +  str(a[i]))
        else:
            tmp -= a[i]
            ans.append(tmp + ' ' +  str(a[i]))
    else:
        ans.append(str(tmp) + ' ' +  str(a[-1]))
        a = tmp - a[-1]
        print(a)

for i in range(len(ans)):
    print(ans[i])


### FIXED CODE ###

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

a.sort(reverse=True)
ans = []
for i in range(n):
    if i == 0:
        tmp = a[i]
    elif 1 <= i < n - 1:
        if a[i] > 0:
            ans.append(str(a[-1]) + ' ' +  str(a[i]))
            a[-1] -= a[i]
        else:
            ans.append(str(tmp) + ' ' +  str(a[i]))
            tmp -= a[i]
    else:
        ans.append(str(tmp) + ' ' +  str(a[-1]))
        a = tmp - a[-1]
        print(a)

for i in range(len(ans)):
    x, y = map(int, ans[i].split())
    print(x, y)
X, A = map(int, input().split())
if X >= A:
  return 10
else:
  return 0

### FIXED CODE ###

X, A = map(int, input().split())
print(int(X >= A)*10)
N, M = [int(i) for i in input().strip().split(' ')]

a = {}
b = {}
for i in range(M):
  X, Y, Z = [int(i) for i in input().strip().split(' ')]
  if X not in a:
    a[X] = set()
    b[X] = 0
  if Y not in a:
    a[Y] = set()
    b[Y] = 0

  a[X].add(Y)
  b[X] += 1
  a[Y].add(X)
  b[Y] += 1

b = sorted(list(b.items()), key=lambda e: e[1], reverse=True)


def make_keys(keys, key):
  if key in keys:
    return
  keys.add(key)
  for k in a[key]:
    make_keys(keys, k)


counter = 0
# print(b)
for key, v in b:
  if key not in a:
    continue
  keys = set()
  make_keys(keys, key)

  for k in keys:
    if k in a:
      del a[k]

  counter += 1

print(counter + N - len(b))

### FIXED CODE ###

N, M = [int(i) for i in input().strip().split(' ')]

a = {}
for i in range(M):
  X, Y, _ = [int(i) for i in input().strip().split(' ')]
  if X not in a: a[X] = set()
  if Y not in a: a[Y] = set()
  a[X].add(Y)
  a[Y].add(X)

len_a = len(a)


def test(key_set):
  tmp = set()
  for key in key_set:
    if key in a:
      tmp = tmp.union(a[key])
      del a[key]

  #print('key_set = {}, tmp = {}'.format(key_set, tmp))
  return tmp


counter = 0
# print(b)

while len(a) > 0:
  #print('---')
  #print('a = {}'.format(a))
  key, key_set = a.popitem()
  #print('key = {}, key_set = {}'.format(key, key_set))
  tmp = test(key_set)
  while len(tmp) > 0:
    tmp = test(tmp)
  #print('a = {}'.format(a))
  counter += 1

print(counter + N - len_a)
listt = input().split()

#doubutsu = 2 #X
#ashi = 100 #Y
doubutsu = int(listt[0])
ashi = int(listt[1])

kame = (ashi-2*doubutsu)/2
tsuru = doubutsu - kame

if type(kame) == int and type(tsuru) == int:
    if kame >= 0 and tsuru >= 0:
        print("Yes")
    elif kame == 0 and tsuru == 0;
        print('No')
    else:
        print("No")
else:
    print("No")

### FIXED CODE ###

listt = input().split()

doubutsu = int(listt[0])
ashi = int(listt[1])

kame = (ashi-2*doubutsu)/2
tsuru = doubutsu - kame

if ashi%2 == 0 and kame >= 0 and tsuru >= 0:
    print('Yes')
else:
    print("No")
X = input()
A = input()

x = int(X)
a = int(A)

if x < a:
    print(0)

elif a <= x:
    print(10)

### FIXED CODE ###

c = input()
l = c.split()

x = int(l[0])
a = int(l[1])

if x < a:
    print(0)

elif a <= x:
    print(10)
import queue
h,w,n = map(int,input().split())
factrys = [None] * (n + 1)
ss = ["X" * (w + 2)]
for i in range(h):
  s = "X" + input() + "X"
  if "S" in s:
    factrys[0] = (i + 1, s.index("S"))
  for j in range(1,n + 1):
    if str(j) in s:
      factrys[j] = (i + 1, s.index(str(j)))
  ss.append(s)
ss.append("X" * (w + 2))
mp = []
que = queue.Queue()
def bfs(i):
  while True:
    (x,y) = que.get()
  #  print(i,x,y)
  #  print(mp[x][y])
    if (x,y) == factrys[i + 1]:
      return mp[x][y]
    count = mp[x][y]
    if ss[x + 1][y] != "X" and mp[x + 1][y] is None:
      mp[x + 1][y] = count + 1
      que.put((x + 1, y))
    if ss[x - 1][y] != "X" and mp[x - 1][y] is None:
      mp[x - 1][y] = count + 1
      que.put((x - 1, y))
    if ss[x][y + 1] != "X" and mp[x][y + 1] is None:
      mp[x][y + 1] = count + 1
      que.put((x, y + 1))
    if ss[x][y - 1] != "X" and mp[x][y - 1] is None:
      mp[x][y - 1] = count + 1
      que.put((x, y - 1))

def bfs_(i):
  for count in range(1000000):
    sz = que.qsize()
    for loop in range(sz):
      (x,y) = que.get()
      if ss[x][y] == "X" or not mp[x][y] is None:
        continue
      if (x,y) == factrys[i + 1]:
        return count
      mp[x][y] = count
      que.put((x + 1, y))
      que.put((x - 1, y))
      que.put((x, y - 1))
      que.put((x, y + 1))

ans = 0
for i in range(n):
  mp = [[None] * (w + 2) for j in range(h + 2)]
  x,y = factrys[i]
  que = queue.Queue()
  mp[x][y] = 0
  que.put((x,y))
  ans += (bfs(i))
print(ans)


### FIXED CODE ###

from collections import deque

def main():
  h, w, n = map(int, input().split())
  mp = ["X" + input() + "X" for _ in range(h)]
  mp.insert(0, "X" * (w + 2))
  mp.append("X" * (w + 2))
  
  poss = [None] * (n + 1)
  for y in range(1, h + 1):
    for x in range(1, w + 1):
      if mp[y][x] == "S":
        poss[0] = (x, y)
      elif "1" <= mp[y][x] <= "9":
        poss[int(mp[y][x])] = (x, y)
  
  ans = 0
  vec = ((1, 0), (0, -1), (-1, 0), (0, 1))
  for i in range(n):
    sx, sy = poss[i]
    gx, gy = poss[i + 1]
    used = [[False] * (w + 2) for _ in range(h + 2)]
    used[sy][sx] = True
    que = deque()
    push = que.append
    pop = que.popleft
    push((0, sx, sy))
    while que:
      cnt, x, y = pop()
      if (x, y) == (gx, gy):
        ans += cnt
        break
      
      for dx, dy in vec:
        nx, ny = x + dx, y + dy
        if used[ny][nx] or mp[ny][nx] == "X":continue
        used[ny][nx] = True
        push((cnt + 1, nx, ny))
  
  print(ans)

main()
x = int(input())
A = list(map(int, input().split()))
A.sort()

for num in range(x):
    print(A.count(num+1))

### FIXED CODE ###

import math
x = input()

# 円の周を計算する
def circle_round(radius):
  return 2 * math.pi * radius

if __name__ == '__main__':
  print(circle_round(int(x)))
n=int(input())
i=1
num=0
suml=[0]
while num<=10**2:
    num+=i
    suml.append(num)
    i+=1

j=1
while n>suml[j]:
    j+=1
k=suml[j]-n
for ii in range(1,j+1):
    if ii!=k:
        print(ii)

### FIXED CODE ###

n=int(input())
i=1
num=0
suml=[0]
while num<=10**7+1000:
    num+=i
    suml.append(num)
    i+=1

j=1
while n>suml[j]:
    j+=1
k=suml[j]-n
for ii in range(1,j+1):
    if ii!=k:
        print(ii)
import fileinput

def process(A, B):
	if A <= B*2:
      return 0
    else:
      return A - B*2

for line in fileinput.input():
    print(process(map(int, line.split()))


### FIXED CODE ###

import fileinput

def process(A, B):
    if A <= B*2:
        return 0
    else:
        return A - B*2

for line in fileinput.input():
    print(process(*map(int, line.split())))
from functools import *
from collections import *
import sys
sys.setrecursionlimit(10**6)
input = sys.stdin.buffer.readline
 
M = 10**9+7

@lru_cache(maxsize=None)
def mod_inv(x):
  if x == 1:
    return 1
  return M // x * -mod_inv(M%x) % M

@lru_cache(maxsize=None)
def calc_subtree(v):
  ret = 1
  size = 1
  for child in Edge[v]:
    Edge[child].remove(v)
    r, s = calc_subtree(child)
    ret = ret * r % M
    size += s
  ret = ret * size % M
  return ret, size

ans = {}
def set_ans(v, a):
  ans[v] = a
  for child in Edge[v]:
    n = calc_subtree(child)[1]
    set_ans(child, ans[v] * n * mod_inv(N-n) % M)

N = int(input())
Edge = defaultdict(set)
fact = N
for i in range(1, N):
  fact = fact * i % M
  a, b = map(int, input().split())
  Edge[a].add(b)
  Edge[b].add(a)

set_ans(1, mod_inv(calc_subtree(1)[0]) * fact % M)
for i in range(1, N+1):
  print(ans[i])



### FIXED CODE ###

S = input()
if S[2]==S[3] and S[4]==S[5]:
  print("Yes")
else:
  print("No")
# -*- coding: utf-8 -*-

n, q = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n - 1)]
px = [list(map(int, 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, p, add):
    value[v] += add
    for x in graph[v]:
        if x == p:
            continue
        dfs(x, v, value[v])


dfs(1, 0, 0)

ans = value[1:]
print(*ans)


### FIXED CODE ###

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

import sys

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

n, q = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n - 1)]
px = [list(map(int, 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, p, add):
    value[v] += add
    for x in graph[v]:
        if x == p:
            continue
        dfs(x, v, value[v])


dfs(1, 0, 0)

ans = value[1:]
print(*ans)
# simply use double ifs
s = input()
print(chr(ord(s))+1)


### FIXED CODE ###

# simply use double ifs
s = input()
print(chr(ord(s)+1))
n=input()
N=int(n)
A=input().split()
for i in range(N):
  if int(A[i])%2==0:
    if int(A[i])%5==0 or int(A[i])%3==0:
      x+=1
  else:
    x+=1
if x==N:
  print('APPROVED')
else:
  print('DENIED')


### FIXED CODE ###

N=int(input())
A=input().split()
x=0
for i in range(N):
  if int(A[i])%2==0:
    if int(A[i])%5==0 or int(A[i])%3==0:
      x+=1
  else:
    x+=1
if x==N:
  print('APPROVED')
else:
  print('DENIED')
s = list(input())
e = [s[i] for i in range(len(s)) if i%2==0]
o = [s[i] for i in range(len(s)) if i%2!=0]
if e in 'L' or o in 'R':
  print('No')
else:
  print('Yes')


### FIXED CODE ###

s = list(input())
e = [s[i] for i in range(len(s)) if i%2==0]
o = [s[i] for i in range(len(s)) if i%2!=0]
if 'L' in e or 'R' in o:
  print('No')
else:
  print('Yes')
n,x = map(int,input().split())
l1='BPPPB'
for i in range(n-1):
    l2 = 'B'+l1+'P'+l1+'B'
    l1 = l2
y = l1[:x].count('P')
print(y)

### FIXED CODE ###

d = int(input())
if d==25:
    print('Christmas')
elif d== 24:
    print('Christmas Eve')
elif d == 23:
    print('Christmas Eve Eve')
elif d == 22:
    print('Christmas Eve Eve Eve')
a,b,c = input()
print('Yes' if a == c else: 'No')

### FIXED CODE ###

a,b,c=input()
print("Yes" if a==c else "No")
#include<iostream>
using namespace std;
int main(void){
  int a,b;
  cin>>a>>b;
  if(a*b%2==0){
    cout<<"No"<<endl;
  }
  else{
    cout<<"Yes"<<endl;
  }
  return 0;
}


### FIXED CODE ###

#coding:utf-8
n=[int(i) for i in input().split()]
if(n[0]*n[1]%2==0):
  print("No")
else:
  print("Yes")
S=str(input())
T=str(input())
dic={}
for s,t in zip(S,T):
    if s in dic:
        if dic[s]!=t:
            print("No")
            exit()
    else:
        dic[s]=t

if len(d)!=len(set(d.values())):
    print("No")   
else:
    print("Yes")             
            
        


### FIXED CODE ###

S=str(input())
T=str(input())
x=[]
y=[]
dic={}

for i in range(len(S)):
    x.append(S[i])
    y.append(T[i])
    
for s,t in zip(x,y):
    if s in dic:
        if dic[s]!=t:
            print("No")
            exit()
    else:
        dic[s]=t

if len(dic)!=len(set(dic.values())):
    print("No")   
else:
    print("Yes")
import math
def lcm(a, b):
	return a * b // math.gcd (a, b)

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

print(lcm(a, b))

### FIXED CODE ###

import fractions
a, b = map(int, input().split())
print(a * b // fractions.gcd(a, b))
# Author: cr4zjh0bp
# Created: Mon Mar 23 15:10:04 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

import numpy as np

n, k = na()
a = np.array(na())

g = np.gcd.reduce(a)
m = np.amax(a)
if g == 1 and k <= m:
    print("Yes")
elif k % g == 0 and k <= m:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

# Author: cr4zjh0bp
# Created: Sun Mar 22 17:06:57 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

n, k = na()
a = na()

def gcd(m, n):
    if n == 0:
        return m
    else:
        return gcd(n, m % n)

g = a[0]
for i in range(n):
    g = gcd(g, a[i])

m = max(a)
if g == 1 and k <= m:
    print("POSSIBLE")
elif k % g == 0 and k <= m:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
n = int(input())
length = len(n)
x = 0

for i in str(n):
    x += int(i)

if n%x == 0:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n = int(input())
x = 0

for i in str(n):
    x += int(i)

if n%x == 0:
    print("Yes")
else:
    print("No")
A,B,C,D=map(int,input().split())
L=A+B
R=C+D

if L > R:
  print("Left")
elif L = R:
  print("Balanced")
elif L < R:
  print("Right")

### FIXED CODE ###

A,B,C,D=map(int,input().split())
L=A+B
R=C+D
if L > R:
  print("Left")
elif L == R:
  print("Balanced")
elif L < R:
  print("Right")
a,b,c = map(str, input().split())
print(str(a[0].uppercase)+str(b[0].uppercase)+str(c[0].uppercase))

### FIXED CODE ###

a,b,c = map(str, input().split())
print(str(a[0].upper())+str(b[0].upper())+str(c[0].upper()))
import math

r = int(input())
print('%f %f' % (2*math.pi*r, (r**2)*math.pi)


### FIXED CODE ###

import math
pi=math.pi
r = float(input())
print('%f %f' % (r*pi*r, 2*r*pi))
H, W = int(input().split())
h, w = int(input().split())

print((H - h) * (W - w))
H, W = map(int, input().split())
h, w = map(int, input().split())

print((H - h) * (W - w))


### FIXED CODE ###

H, W = map(int, input().split())
h, w = map(int, input().split())

print((H - h) * (W - w))
import math
h, w, a, b = map(int, input().split(' '))

MOD = 10**9 + 7

def ncr(n, r):
    f = math.factorial
    return f(n) / f(r) / f(n-r)


r = 0
for i in range(b, w):
    y1 = h - a - 1
    x1 = i
    y2 = a - 1
    x2 = w - i - 1
    p = (ncr(x1 + y1, x1) * ncr(x2 + y2, x2)) % MOD
    r = (r + p) % MOD

print(int(r))


### FIXED CODE ###

from array import *
import time
h, w, a, b = map(int, input().split(' '))
MOD = 10**9 + 7
MAX = max(h+w-a-1, a+w)


def modpow(a, b):
    res = 1
    while b:
        if (b & 1):
            res = (res * a) % MOD
        a = (a * a) % MOD
        b >>= 1
    return res


def nCr(n, r):
    if r == 0 or n == r:
        return 1
    return (((f[n] * ivf[n-r]) % MOD) * ivf[r]) % MOD


f = [1] * MAX
f = array('q', f)
ivf = [0] * MAX
ivf = array('q', ivf)
for i in range(1, MAX):
    f[i] = (f[i-1] * i) % MOD
    ivf[i] = modpow(f[i], MOD-2)
r = 0
for i in range(b, w):
    y1 = h - a - 1
    x1 = i
    y2 = a - 1
    x2 = w - i - 1
    p = (nCr(x1 + y1, x1) * nCr(x2 + y2, x2)) % MOD
    r = (r + p) % MOD
print(int(r))
import bisect
N = int(input())
A = list(map(int, input().split()))
A.sort()
insert_index = bisect.bisect_left(A,0)
if len(A[:insert_index]) % 2 == 0:
    Ans = -1*sum(A[:insert_index])+sum(A[insert_index:])
else:
    Tmp = -1*sum(A[:insert_index])+sum(A[insert_index:])
    if insert_index == 0:   #全て正のとき
        Ans = Tmp - A[0]*2
    else:
        Ans = max(Tmp-A[insert_index]*2, Tmp+A[insert_index-1]*2)
print(Ans)

### FIXED CODE ###

import bisect
total = 0
N = int(input())
A = list(map(int, input().split()))
hu = [i for i in A if i < 0]
sei = [i for i in A if i >= 0]
hu.sort()
sei.sort()
if len(hu) % 2 == 0:
    print(sum(sei)+sum(hu)*-1)
else:
    if sei:
        print(sum(sei)+sum(hu)*-1 - min(-1*hu[-1], sei[0])*2)
    else:
        print(sum(sei)+sum(hu)*-1 + 1*hu[-1]*2)
s = input()
k = int(input())

print(list(filter(lambda c: c != '1', list(s)))[0])

### FIXED CODE ###

s = input()
k = int(input())

for i in range(len(s)):
    if s[i] != '1':
        print(s[i] if i+1 <= k else 1)
        exit()

print(1)
N, K = map(int, input().split())
pi = list(map(int, input().split()))

max = 0
maxi = 0
for i range(N - K):
    sum = pi(i) + pi(i + 1) + pi(i + 2)
    if sum >= max:
        max = sum
        maxi = i

out = 1 + (pi(maxi) - 1) * 0.5 + 1 + (pi(maxi + 1) - 1) * 0.5 + 1 + (pi(maxi + 2) - 1) * 0.5
print(out)

### FIXED CODE ###

N, K = map(int, input().split())
pi = list(map(int, input().split()))

tmp = sum(pi[0 : K])
max = tmp

if N == K:
    print((max + K) / 2)
else:
    for i in range(N - K):
        tmp = tmp - pi[i] + pi[i + K]
        if tmp > max:
            max = tmp
    print((max + K) / 2)
import numpy as np
N, M, C = map(int, input().split()) 
B = np.array(list(map(int, input().split())))
A = np.array([list(map(int,list(input()))) for i in range(N)])

ans = 0
for i in range(M):
  if np.sum(A[:, i] * B) + C > 0:
    ans += 1
print(ans)

### FIXED CODE ###

import numpy as np
N, M, C = map(int, input().split()) 
B = np.array(list(map(int, input().split())))
A = np.array([list(map(int,list(input().split()))) for i in range(N)])
 
ans = 0
for i in range(N):
    val = np.sum(A[i, :] * B) + C
    if val > 0:
        ans += 1
print(ans)
import bisect
import copy
import heapq
import math
import sys
from collections import *
from itertools import accumulate, combinations, permutations, product
from math import gcd
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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

tmp=[0,abs(a[0])]
for i in range(n):
    if tmp[1]<abs(a[i]):
        tmp[0]=i
        tmp[1]=abs(a[i])
# print(tmp)

lst=[]

for i in range(n):
    a[i]+=tmp[1]
    lst.append([tmp[0]+1,i+1])

if a[tmp[0]-1]<0:
    for i in range(n-1):
        a[-2-i]-=a[-1-i]
        lst.append([n-i,n-i-1])
else:
    for i in range(n-1):
        a[i+1]+=a[i]
        lst.append([1+i,2+i])
# print(a)
# print(lst)
print(len(lst))
for i in lst:
    print(*i)

### FIXED CODE ###

import bisect
import copy
import heapq
import math
import sys
from collections import *
from itertools import accumulate, combinations, permutations, product
# from math import gcd
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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

tmp=[0,abs(a[0])]
for i in range(n):
    if tmp[1]<abs(a[i]):
        tmp[0]=i
        tmp[1]=abs(a[i])
# print(tmp)

lst=[]

for i in range(n):
    a[i]+=a[tmp[0]]
    lst.append([tmp[0]+1,i+1])

# print(a[tmp[0]])
if a[tmp[0]]<0:
    for i in range(n-1):
        a[-2-i]+=a[-1-i]
        lst.append([n-i,n-i-1])
else:
    for i in range(n-1):
        a[i+1]+=a[i]
        lst.append([1+i,2+i])
# print(a)
# print(lst)
print(len(lst))
for i in lst:
    print(*i)
N = int(input())
listA = [0] * N
listB = [0] * N
idx = 0
for i in range(N):
  listA[idx],listB[idx] = map(int, input().split())
  idx += 1

medianA = 0
medianB = 0
ans = 0
if N%2 == 0:
  medianA = statistics.median(listA)
  medianB = statistics.median(listB)
  ans = (medianB - medianA) * 2 + 1
else:
  medianA = statistics.median(listA)
  medianB = statistics.median(listB)
  ans = medianB - medianA + 1

print(int(ans))

### FIXED CODE ###

import statistics
import math

N = int(input())
listA = [0] * N
listB = [0] * N
idx = 0
for i in range(N):
  listA[idx],listB[idx] = map(int, input().split())
  idx += 1

medianA = 0
medianB = 0
ans = 0
if N%2 == 0:
  medianA = statistics.median(listA)
  medianB = statistics.median(listB)
  ans = (medianB - medianA) * 2 + 1
else:
  medianA = statistics.median(listA)
  medianB = statistics.median(listB)
  ans = medianB - medianA + 1

print(int(ans))
import math
N,M = map(int, input().split())
a = 0
b = 0
if N != 1:
    a = math.factorial(N)/(2*math.factorial(N-2))
if M != 1:
    b = math.factorial(M)/(2*math.factorial(M-2))
print(int(a+b))

### FIXED CODE ###

import math
N,M = map(int, input().split())
a = 0
b = 0
if N != 1 and N != 0:
    a = math.factorial(N)/(2*math.factorial(N-2))
if M != 1 and M != 0:
    b = math.factorial(M)/(2*math.factorial(M-2))
print(int(a+b))
sum=0
for i in range(5):
  y=int(input())
  x=10-y%10
  min=min(min, 10)
  if x=min:
    sum+=y
  else:
    sum+=y+x
print(sum)

### FIXED CODE ###

X=[int(input()) for i in range(5)]
Y=[]
for x in X:
  Y.append(-(-x//10)*10-x)
print(sum(X)+sum(Y)-(max(Y)))
n = int(input())

def push(chara, dig):
  if ord(chara) + dig > 90: return chr(64 + dig + ord(chara) -90)
  else: return chr(dig + ord(chara))
  
string = input()

for i in range(0, len(string)):
  string[i] = push(string[i], n)
  
print(string)

### FIXED CODE ###

n = int(input())

def push(chara, dig):
  if ord(chara) + dig > 90: return chr(64 + dig + ord(chara) -90)
  else: return chr(dig + ord(chara))
  
string = input()
e = ""
for i in range(0, len(string)):
  e = e + push(string[i], n)
  
print(e)