Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

import itertools
import math

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

#n=5
#a=[6,9,4,2,11]

b=list(itertools.combinations(a,2))
c=[]
for bi in b:
  bl=list(bi)
  bl.sort()
  c1=[0 for i in range(bl[1])] 
  c4=len(list(itertools.combinations(c1,bl[0])))
  c.append([c4,bl[1],bl[0]])
c.sort()
print(c[len(c)-1][1],c[len(c)-1][2])

### FIXED CODE ###

import itertools
import math

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

#n=5
#a=[6,9,4,2,11]

a1=max(a)
a.remove(a1)
a2=a1/2
b=[]
for i in a:
  b.append(abs(i-a2))

print(a1,a[b.index(min(b))])
### BUGGY CODE ###

N = int(input())
a = []
for i in range(N):
    a.append(int(input()))

for i in range(N):
    val = a[i]
    del a[i]
    print(max(a))
    a.insert(i, val)


### FIXED CODE ###

N = int(input())
a = []
for i in range(N):
    a.append(int(input()))
b = sorted(a)

if a.count(b[-1]) > 1:
    for i in range(N):
        print(b[-1])
else:
    ind = a.index(b[-1])
    for i in range(N):
        if i == ind:
            print(b[-2])
        else:
            print(b[-1])
### BUGGY CODE ###

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

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)]
 
g = [[] for _ in range(N+1)]
for a,b in AB:
    g[a].append(b)
    g[b].append(a)
 
cnt = [0] * (N+1)
for p,x in PX:
    cnt[p] += x

def dfs(v, p, add):
    cnt[v] += add
    for nv in g[v]:
        if nv == p:
            continue
        dfs(nv, v, cnt[v])

dfs(1, 0, 0)

print(' '.join(map(str, cnt[1:])))        

### FIXED CODE ###

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

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)]
 
g = [[] for _ in range(N+1)]
for a,b in AB:
    g[a].append(b)
    g[b].append(a)
 
cnt = [0] * (N+1)
for p,x in PX:
    cnt[p] += x

def dfs(v, p, add):
    cnt[v] += add
    for nv in g[v]:
        if nv == p:
            continue
        dfs(nv, v, cnt[v])

dfs(1, 0, 0)

print(' '.join(map(str, cnt[1:])))
### BUGGY CODE ###

K, S = map(int, input().split())

# print(K,S)
cnt = 0
for i in range(K+1):
  for j in range(K+1):
    for k in range(K+1):
#      print(i+j+k)
      if i+j+k == S:
        cnt += 1
print(cnt)


### FIXED CODE ###

K, S = map(int, input().split())

# print(K,S)
cnt = 0
for i in range(K+1):
  for j in range(K+1):
    if i+j <= S and i+j+K >= S:
      cnt += 1
print(cnt)
### BUGGY CODE ###

def main():
    import sys
    from collections import defaultdict
    sys.setrecursionlimit(10 ** 6)
    input = sys.stdin.readline
    N, M, Q = [int(x) for x in input().strip().split()]
    abcd = [0] * Q
    for q in range(Q):
        abcd[q] = [int(x) for x in input().strip().split()]

    abcd.sort(key=lambda x:(x[0],x[1]))
    ans = 0
    for i in range(1, 2 ** Q):
        vec = [1] * N
        flag = [False] * N
        ans_ = 0
        for q in range(Q):
            # print((i >> q) % 2, end='')
            if (i >> q) % 2 == 0:
                continue
            a, b, c, d = abcd[q]
            if not flag[b-1]:
                if vec[a-1] + c > M:
                    break
                vec[b-1] = vec[a-1] + c
                ans_ += d
                flag[b-1] = True
                flag[a-1] = True
            elif vec[b-1] - vec[a-1] == c:
                ans_ += d
            else:
                break
        
        if vec != sorted(vec):
            continue
            
        ans = max(ans, ans_)

    print(ans)

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    import sys
    from collections import defaultdict
    sys.setrecursionlimit(10 ** 6)
    input = sys.stdin.readline
    N, M, Q = [int(x) for x in input().strip().split()]
    abcd = [0] * Q
    for q in range(Q):
        abcd[q] = [int(x) for x in input().strip().split()]

    abcd.sort(key=lambda x:(x[0],x[1]))
    vecs = []

    def makevecs(n, vecs, A):
        if n == N:
            vecs.append(A)
            return None
        for b in range(A[-1], M+1):
            makevecs(n+1, vecs, A+[b])
        return None
        
    makevecs(1, vecs, [1])
    ans = 0
    for vec in vecs:
        ans_ = 0
        for q in range(Q):
            a, b, c, d = abcd[q]
            if vec[b-1] - vec[a-1] == c:
                ans_ += d
        
        ans = max(ans, ans_)

    print(ans)

if __name__ == '__main__':
    main()
### BUGGY CODE ###

# -*- coding: utf-8 -*-
"""
D - Digits Parade
https://atcoder.jp/contests/abc135/tasks/abc135_d

"""
import sys


def solve(S):
    dp = [[0] * 13 for _ in range(len(S)+1)]
    dp[0][0] = 1
    for i, ch in enumerate(S):
        c = -1 if ch == '?' else int(ch)
        for j in range(10):
            if (c != -1 and c != j):
                continue
            for ki in range(13):
                dp[i+1][(ki*10 + j) % 13] += dp[i][ki]
        for j in range(13):
            dp[i+1][j] %= (10**9 + 7)
    return dp[len(S)][5]


def main(args):
    S = input()
    ans = solve(S)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])


### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
D - Digits Parade
https://atcoder.jp/contests/abc135/tasks/abc135_d

"""
import sys


def solve(S):
    dp = [[0] * 13 for _ in range(len(S)+1)]
    dp[0][0] = 1
    for i, ch in enumerate(S):
        c = -1 if ch == '?' else int(ch)
        for j in range(10):
            if (c != -1 and c != j):
                continue
            for ki in range(13):
                dp[i+1][(ki*10 + j) % 13] += dp[i][ki]
        for j in range(13):
            dp[i+1][j] %= (10**9 + 7)
    return dp[len(S)][5]


def main(args):
    S = input()
    ans = solve(S)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])
### BUGGY CODE ###

n,m=map(int,input().split())
l=[list(map(int,input().split())) for i in range(m)]
L=[]
for j in range(m):
  if l[j][0]==1:L.append(l[j][1])
  if l[j][1]==1:L.append(l[j][0])
c=0
for k in range(len(L)):
  if c!=0:
    break
  for j in range(m):
    if L[k]==l[j][0] and l[j][1]==n:
      c+=1
      break
    if L[k]==l[j][1] and l[j][0]==n:
      c+=1
      break
if c==1:print('POSSIBLE')
else:print('IMPOSSIBLE')

### FIXED CODE ###

n,m=map(int,input().split())
L=[];l=[]
for k in range(n):
  L.append(0)
for i in range(m):
  x=list(map(int,input().split()))
  l.append(x)
  if x[0]==1:
    L[x[1]]+=1
  if x[1]==1:
    L[x[0]]+=1
  if x[0]==n:
    L[x[1]]+=1
  if x[1]==n:
    L[x[0]]+=1
if max(L)==2:print('POSSIBLE')
else:print('IMPOSSIBLE')
### BUGGY CODE ###

n=int(input())
a=list(map(int,input().split()))
at=list(set(a))
ans=0
for i in range(len(at)):
  cnt=0
  for j in range(n):
    if a[j]==at[i] or a[j]==at[i]+1 or a[j]==at[i]-1:
      cnt=cnt+1
  ans=max(ans,cnt)
print(ans)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
temp=[0]*(max(a)+1)
for i in range(n):
  temp[a[i]]=temp[a[i]]+1
ans=0
if max(a)==0 or max(a)==1:
  print(n)
else:
  for i in range(1,max(a)):
    ans=max(ans,temp[i-1]+temp[i]+temp[i+1])
  print(ans)
### BUGGY CODE ###

import sys
readline = sys.stdin.buffer.readline

def make_modinv_list(n, mod=10**9+7):
    inv_list = [0]*(n+1)
    inv_list[1] = 1
    for i in range(2, n+1):
        inv_list[i] = (mod - mod//i * inv_list[mod%i] % mod)
    return inv_list

mod = 998244353
N = int(readline())
A = list(map(int, readline().split()))
C = max(A) + 1
inv_list = make_modinv_list(C, mod)
h = [0] * C
l = [0] * C
for x in A:
    h[x] = (h[x] + x) % mod
    l[x] = (l[x] + x**2) % mod
for i in range(1, C):
    for j in range(i*2, C, i):
        h[i] = (h[i] + h[j]) % mod
        l[i] = (l[i] + l[j]) % mod
inv2 = inv_list[2]
g = [(h[i]**2 - l[i]) * inv2 % mod for i in range(C)]
for i in range(C-1, 0, -1):
    for j in range(i*2, C, i):
        g[i] = (g[i] - g[j]) % mod
ans = 0
for i in range(1, C):
    ans = (ans + g[i] * inv_list[i]) % mod
print(ans)    


### FIXED CODE ###

import sys

readline = sys.stdin.readline

ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))

def modinv(x, mod):
    a, b = x, mod
    u, v = 1, 0
    while b:
        t = a // b
        a -= t * b; a, b = b, a
        u -= t * v; u, v = v, u
    return u % mod

def solve():
  n = ni()
  a = nl()
  m = max(a)
  mod = 998244353
  l = [0]*(m+1)
  for x in a:
    l[x] += x
  sieve = [1]*(m+1)
  sieve[0] = sieve[1] = 0
  for i in range(2, m+1):
    if sieve[i]:
      for j in range(m//i, 0, -1):
        sieve[j*i] = 0
        l[j] += l[j*i]
      sieve[i] = 1
  for i in range(m+1):
    l[i] = l[i] * l[i] % mod
  for i in range(2, m+1):
    if sieve[i]:
      for j in range(1, m//i + 1):
        l[j] -= l[j*i]
  s = -sum(a)
  for i in range(1, m+1):
    if l[i]:
      s = (s + l[i] * modinv(i, mod)) % mod
  print(s * modinv(2, mod) % mod)
  return

solve()
### BUGGY CODE ###

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

p = 0

for a in range(1, n+1):
    for b in range(1, n+1):
        for c in range(1, n+1):
            x = a+b
            y = b+c
            z = c+a
            xa = x % k
            xb = y % k
            xc = z % k
            if xa == 0 and xb == 0 and xc == 0:
                p += 1
            else:
                pass
              
print( p )

### FIXED CODE ###

n, k = map( int, input().split() )
ans = int((n//k)**3)

if k%2 == 1:
    print(ans)
else:
    ans += int(((n-k//2)//k+1)**3)
    print(ans)
### BUGGY CODE ###

import sys
readline = sys.stdin.readline


def chmax(a, b):
    """
    2値の大きい値を返す

    Args:
        a   (int)   : 値１
        b   (int)   : 値２
    Return:
        a   (int)   : aまたはbの大きい値
    """
    if a < b:
        a = b
    return a


def main():

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

    # knopsock[n][0] = w    :   n = 品物の位置 , w = 重さ
    # knopsock[n][1] = v    :   n = 品物の位置 , v = 価値
    knapsack = [list(map(int, readline().split())) for _ in range(N)]

    # db[n][w] = v          :   w = 現在の重さ, n = 見てきた品物の数, v = 現在の価値
    dp = [[0] * (W + 1) for _ in range(N + 1)]

    for n in range(1, N + 1):
        for w in range(W + 1):
            if w - knapsack[n - 1][0] < 0:
                dp[n][w] = dp[n - 1][w]
            else:
                dp[n][w] = chmax(dp[n - 1][w], dp[n - 1]
                                 [w - knapsack[n - 1][0]] + knapsack[n - 1][1])

    print(dp[N][W])


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
readline = sys.stdin.readline


def chmax(a, b):
    """
    2値の大きい値を返す

    Args:
        a   (int)   : 値１
        b   (int)   : 値２
    Return:
        a   (int)   : aまたはbの大きい値
    """
    if a < b:
        a = b
    return a


def main():

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

    # knopsock[n][0] = w    :   n = 品物の位置 , w = 重さ
    # knopsock[n][1] = v    :   n = 品物の位置 , v = 価値
    knapsack = [list(map(int, readline().split())) for _ in range(N)]

    # db[n][w] = v          :   w = 現在の重さ, n = 見てきた品物の数, v = 現在の価値
    dp = [[0] * (W + 1) for _ in range(N + 1)]

    for n in range(1, N + 1):
        for w in range(W + 1):
            if w - knapsack[n - 1][0] < 0:
                dp[n][w] = dp[n - 1][w]
            else:
                dp[n][w] = chmax(dp[n - 1][w], dp[n - 1]
                                 [w - knapsack[n - 1][0]] + knapsack[n - 1][1])

    print(dp[N][W])


if __name__ == "__main__":
    main()
### BUGGY CODE ###

S = input()
Q = int(input())
reverseFlag = False
for i in range(Q):
    tmp = input()
    if tmp[0] == '1':
        reverseFlag = not reverseFlag
    else:
        tmpt, tmpf, tmpc = tmp.split(' ')
        if tmpf == '1' and reverseFlag == False or tmpf == '2' and reverseFlag == True:
            S = tmpc + S
        else:
            S = S + tmpc

if reverseFlag == True:
    S = S[::-1]
print(S)

### FIXED CODE ###

S = input()
Q = int(input())
reverseFlag = False
forwardList = []
backwardList = []
for i in range(Q):
    tmp = input()
    if tmp[0] == '1':
        reverseFlag = not reverseFlag
    else:
        tmpt, tmpf, tmpc = tmp.split(' ')
        if tmpf == '1' and reverseFlag == False or tmpf == '2' and reverseFlag == True:
            forwardList.append(tmpc) 
        else:
            backwardList.append(tmpc)

if reverseFlag == True:
    S = ''.join(reversed(backwardList)) + S[::-1] + ''.join(forwardList)
else:
    S = ''.join(reversed(forwardList)) + S + ''.join(backwardList)
print(S)
### BUGGY CODE ###

N=int(input())
A=[ai for ai in map(int,input().split())]
CA={}
for a in A:
    if a in CA:
        CA[a]+=1
    else:
        CA[a]=1
CA_KEYS=sorted(CA.keys())

for Ai in CA_KEYS:
    CA_Tmp={ai:0 for ai in CA_KEYS}
    crnt=A[0]
    next=Ai
    CA_Tmp[crnt]=1
    if CA_Tmp[next] > CA[next]:
        continue
    Ans=True
    for j in range(1, N):
        if next in CA:
            CA_Tmp[next]+=1
            if CA_Tmp[next] > CA[next]:
                Ans=False
                break
            crnt,next=next,crnt^next
        else:
            Ans=False
            break
    if Ans==True:
        if next!=A[0]:
            Ans=False
        else:
            break


print("Yes" if Ans==True else "No")


### FIXED CODE ###


import collections as col
N=int(input())
A=[ai for ai in map(int,input().split())]
Ans=False
CA=col.Counter(A)
if len(CA)==1 and 0 in CA:
    Ans=True
elif len(A)%3==0:
    if len(CA)==3:
        K=list(CA.keys())
        if (K[0]^K[1]==K[2]) and (CA[K[0]]==CA[K[1]]==CA[K[2]]):
            Ans=True
    elif len(CA)==2:
        K=list(sorted(CA.keys()))
        if CA[K[0]]*2==CA[K[1]]:
            Ans=True

print("Yes" if Ans==True else "No")
### BUGGY CODE ###

s=[j for j in input()]
#print(len(s))
#print(s)

def check():
  flag=0
  for j in range(len(s)-1):
    if s[j]=='B' and s[j+1]=='W':
      flag=1
  return flag

ans=0
while check()==1:
  for j in range(len(s)-1):
    if s[j]=='B' and s[j+1]=='W':
      ans+=1
      s[j]='W'
      s[j+1]='B' 
  check()

print(ans)


### FIXED CODE ###

s=[i for i in input()]
#print(s)

cntb=0
cnta=0
for k in range(len(s)):
  if s[k]=='B':
    cntb+=1
  if s[k]=='W':
    cnta+=cntb

print(cnta)
### BUGGY CODE ###

n,k=map(int,input().split())
h=list(map(int,input().split()))
dp=[0]*n
for i in range(1,n):
    cnt=[]
    for j in range(max(0,i-k),i):
        cnt.append(dp[j]+abs(h[j]-h[i]))
    dp[i]=min(cnt)
print(dp[-1])


### FIXED CODE ###

n,k=map(int,input().split())
h=list(map(int,input().split()))
dp=[0]*n
for i in range(1,n):
    cnt=[]
    for j in range(max(0,i-k),i):
        cnt.append(dp[j]+abs(h[j]-h[i]))
    dp[i]=min(cnt)
print(dp[-1])
### BUGGY CODE ###

import heapq
from collections import defaultdict


class Dijkstra(object):

    """ 使用例
    dik = Dijkstra()
    edge = defaultdict(list)
    edge[(1, 1)].append([1, (1, 2)])
    edge[(1, 2)].append([1, (1, 1)])
    edge[(1, 2)].append([2, (2, 1)])
    edge[(2, 1)].append([2, (1, 2)])
    edge[(2, 1)].append([5, (2, 2)])
    edge[(2, 2)].append([5, (2, 1)])
    edge[(2, 2)].append([3, (1, 2)])
    edge[(1, 2)].append([3, (2, 2)])

    s0 = (1, 1)
    ans = dik(s0, edge)

    """

    def __init(self):
        pass

    def __call__(self, s0, edge):

        # s0:始点 (,,,)
        # edge[(,,,)] = [コスト、(,,,)], [コスト、(,,,)]

        d = dict()  # lambda: float('inf'))
        used = dict()  # lambda: True)

        edgelist = edge[s0]
        heapq.heapify(edgelist)

        d[s0] = 0
        used[s0] = False

        while len(edgelist):
            minedge = heapq.heappop(edgelist)
            if not used.get(minedge[1], True):
                continue
            v = minedge[1]
            d[v] = minedge[0]
            used[v] = False

            for e in edge[v]:
                if used.get(e[1], True):
                    # if d[e[1]] <= d[v] + e[0]:
                    #     continue
                    heapq.heappush(edgelist, [d[v] + e[0], e[1]])

        return d


N, M, S = map(int, input().split())

s_max = 2500
S = min(S, s_max)

dik = Dijkstra()
edge = defaultdict(list)
s0 = (1, S)

for m in range(1, M + 1):
    U, V, A, B = map(int, input().split())
    for s in range(A, s_max + 1):
        edge[(U, s)].append([B, (V, s - A)])
        edge[(V, s)].append([B, (U, s - A)])

for n in range(1, N + 1):
    C, D = map(int, input().split())
    for s in range(s_max + 1):
        s1 = min(s + C, s_max)
        edge[(n, s)].append([D, (n, s1)])

d = dik(s0, dict(edge))

for n in range(2, N + 1):
    ans = []
    for s in range(s_max + 1):
        ans.append(d[(n, s)])
    print(min(ans))


### FIXED CODE ###

import heapq
import sys
input = sys.stdin.readline
 
INF = 10 ** 18
 
class Edge():
    def __init__(self, end, cost, time):
        self.end = end
        self.cost = cost
        self.time = time
 
dp = []
h = []
 
def push(t, v, x):
    if x < 0:
        return
    if dp[v][x] <= t:
        return
    dp[v][x] = t
    heapq.heappush(h, (t, v, x))
 
def dijkstra(n, G, cd, start, s, max_s):
    global dp
    dp = [[INF for j in range(max_s+1)] for i in range(n)] 
    push(0, start, s)
 
    while h:
        # 使っていない頂点のうち、現時点で最も到達短時間が短いものを選びvとする
        t, v, x = heapq.heappop(h)
        if dp[v][x] < t:
            continue
        # 両替
        if x < max_s:
            push(t+cd[v][1], v, min(x+cd[v][0], max_s))
        # vから到達可能な頂点について、到達時間が短くなれば更新
        for e in G[v]:
            push(t+e.time, e.end, x-e.cost)
 
 
n, m, s = map(int, input().split())
uvab = [list(map(int, input().split())) for _ in range(m)]
cd = [list(map(int, input().split())) for _ in range(n)]
 
es = [[] for i in range(n)]
max_s = 50 * (n-1)
 
for u, v, a, b in uvab:
    es[u-1].append(Edge(v-1,a,b))
    es[v-1].append(Edge(u-1,a,b))
 
dijkstra(n, es, cd, 0, min(max_s,s), max_s)
 
for i in range(1, n):
    print(min(dp[i]))
### BUGGY CODE ###

def m():
    n, m = map(int, input().split())
    bridge = [1 for _ in range(n)]
    g = []
    for _ in range(m):
        a, b = map(int, input().split())
        g.append((a, b))
    g.sort(key=lambda x: x[1])
    cnt = 0
    for e in g:
        f = 0
        for j in range(e[1]-1, e[0]-1, -1):
            if bridge[j] == 0:
                f = 1
                break
        if f:
            continue
        # if bridge[e[0]:e[1]].count(0):
        #     continue
        bridge[e[1]-1] = 0
        cnt += 1
    return cnt

print(m())

### FIXED CODE ###

def m():
    n, m = map(int, input().split())
    bridge = [1 for _ in range(n)]
    g = []
    for _ in range(m):
        a, b = map(int, input().split())
        g.append((a, b))
    g.sort(key=lambda x: x[1])
    cnt = 0
    for e in g:
        f = 0
        for j in range(e[1]-1, e[0]-1, -1):
            if bridge[j] == 0:
                f = 1
                break
        if f:
            continue
        # if bridge[e[0]:e[1]].count(0):
        #     continue
        bridge[e[1]-1] = 0
        cnt += 1
    return cnt

print(m())
### BUGGY CODE ###

import math
import bisect
import heapq
from collections import deque

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

h = list(map(int, input().split()))

d = [float('inf')] * n
d[0] = 0

for i in range(1, n):
    p = [d[i - j] + abs(h[i - j] - h[i]) for j in range(1,min(k+1,i+1))]

    d[i] = min(p)

print(d[n - 1])


### FIXED CODE ###

# import math
# import bisect
# import heapq
# from collections import deque

def main():
    n, k = map(int, input().split())

    h = list(map(int, input().split()))
    inf = 10**7
    d = [inf] * n
    d[0] = 0

    for j in range(1, n):
        p = [d[i] + abs(h[j] - h[i]) for i in range(max(0, j - k), j)]

        d[j] = min(p)

    print(d[-1])

if __name__ == "__main__":
    main()
### BUGGY CODE ###

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

############################################

# read data for n sequences.
N = int(input())
data = input()

out = 0

if N > 2:
    for ii, i in enumerate(data[:-2]):
        for jj,j in enumerate(data[ii+1:-1]):
            jj = jj+ii+1
            if i!=j:
                for kk, k in enumerate(data[jj+1:]):
                    kk = kk+jj + 1
                    if i!=k and j!=k:
                        if (jj-ii) != (kk-jj):
                            out+=1
print(out)



### FIXED CODE ###

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

############################################

# read data for n sequences.
N = int(input())
data = input()

out = 0
r=0;g=0;b=0;
for d in data:
    if d =="R":
        r+=1
    elif d=="B":
        b+=1
    else:
        g+=1
out = r*g*b

if N > 2:
    for ii, i in enumerate(data[:-2]):
        for jj,j in enumerate(data[ii+1:-1]):
            jj = jj+ii+1
            if i!=j:
                sum1 = 0                    
                for d in [d for d in "RGB"]:
                    if i!=d and j!=d:
                        let = d

                if jj+jj-ii<N:
                    if data[jj+jj-ii]==let:                    
                        out-=1
print(out)
### BUGGY CODE ###

n = int(input())
a = 1
for i in range(1, n+1):
      a *= i
print(a%(10**9+7))

### FIXED CODE ###

n = int(input())
p = 1
for i in range(1, n+1): 
  p = (p*i)%(10**9+7) #合同式より同じ数で割れば任意の数で乗算しても余りは等しい
print(p)
### BUGGY CODE ###

import numpy as np
n = int(input())
a = list(map(int, input().split()))
a_max = max(a)
l = len(bin(a_max)) - 2
bits = np.zeros((l,2))
for num in a:
    for i, bit in enumerate(format(num, 'b').zfill(l)):
        if bit == '0':
            bits[i,0] += 1
        else:
            bits[i,1] += 1

sumation = 0
div = (10**9+7)
for i in range(l):
    sumation += (bits[i,0]) * (bits[i, 1]) * (2**(l-i-1) % div)
print(int(sumation % (10**9+7)))
    

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
a_max = max(a)
l = len(bin(a_max)) - 2
bits = [[0, 0] for _ in range(l)]
for num in a:
    for i, bit in enumerate(format(num, 'b').zfill(l)):
        if bit == '0':
            bits[i][0] += 1
        else:
            bits[i][1] += 1

sumation = 0
div = (10**9+7)
for i in range(l):
    sumation += (bits[i][0]) * (bits[i][1]) * (2**(l-i-1) % div)
print(int(sumation % (10**9+7)))
### BUGGY CODE ###

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

d = {}
for a in A:
  d[a] = d.get(a, 0) + 1
for a in set(A):
  d[a] = (d[a], int(d[a]*(d[a]-1)/2))
  
for i in range(N):
  tmp_d = d.copy()
  tmp = tmp_d[A[i]][0] - 1
  tmp_d[A[i]] = (tmp, int(tmp*(tmp-1)/2))
  sum = 0
  for v in tmp_d.values():
    sum += v[1]
  print(sum)

### FIXED CODE ###

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

d = {}
for a in A:
  d[a] = d.get(a, 0) + 1
sum = sum([v*(v-1)/2 for v in d.values()]) 

for i in range(N):
  print(int(sum-d[A[i]]+1))
### BUGGY CODE ###

N, A, B = map(int, input().split())
h = [-int(input()) for i in range(N)]

import heapq
heapq.heapify(h)

thre = 0
ans = 0
while True:
    h_target = heapq.heappop(h)
    if h_target >= thre:
        break

    heapq.heappush(h, h_target + (A - B))
    thre -= B
    ans += 1

print(ans)


### FIXED CODE ###

N, A, B = map(int, input().split())
h = [int(input()) for i in range(N)]

import math

def enough(T):
    num = 0
    for hi in h:
        if hi - B * T <= 0:
            return True

        num += math.ceil((hi - B * T) / (A - B))
        if num > T:
            return False

    return True

h.sort(reverse=True)

iFrom = 1
iTo = math.ceil(h[0] / B)
while iFrom != iTo:
    iMid = iFrom + (iTo - iFrom) // 2

    if enough(iMid) == True:
        iTo = iMid
    else:
        iFrom = iMid + 1

print(iFrom)
### BUGGY CODE ###

N = int(input())
xy = [list(map(int,input().split())) for i in range(N)]
xy.sort()
xy = [list(x) for x in zip(*xy)]
ans = 0
for i in range(N-1):
    a = xy[1][i]
    x = xy[0][i+1:]
    y = list(map(lambda y: abs(y-a),xy[1][i+1:]))
    z = [i+j for i,j in zip(x,y)]
    ans = max(ans,max(z)-xy[0][i])
print(ans)

### FIXED CODE ###

N = int(input())
xy = [list(map(int,input().split())) for i in range(N)]
xy = [list(x) for x in zip(*xy)]
a = [i+j for i,j in zip(xy[0],xy[1])]
b = [i-j for i,j in zip(xy[0],xy[1])]
aa = max(a) - min(a)
ba = max(b) - min(b)
print(max(aa,ba))