Harryxun/stf_run huggingface dataset:
n = int(input())
a = list[map(int.input().split())]
 
 
print(min(a), max(a), sum(a))


### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
 
 
print(min(a), max(a), sum(a))
import numpy as np
N,M,X = map(int,input().split())

clist=[]
for i in range(N):
    clist.append(list(map(int,input().split())))

#print(clist)

total_all=[]
for i in range(2**N):
    total=np.zeros(M+1)
    for j in range(N):
        
        # iを2進数表記した場合の下から数えてj番目が1ならtrue
        if ((i >> j) & 1):
            total=total+np.array(clist[j])
    total_all.append(list(total))

#print(total_all)
ans=[]
#print(total_all[1][1:M+1])

for i in range(len(total_all)):
    if min(total_all[i][1:M])>=X:
        ans.append(total_all[i][0])

if len(ans)>=1:
    print(int(min(ans)))
else:
    print("-1")

### FIXED CODE ###

import numpy as np

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

listC=[]
listall=[]

for i in range(N):
    listC.append(list(map(int,input().split())))

for i in range(2**N):
    total=np.zeros(M+1)
    for j in range(N):
        
        if ((i >> j) & 1):
            total=total+np.array(listC[j])
            #print(total)
    listall.append(list(total))
            


#print(listall)
ans=[]
for i in range(len(listall)):
    flag=True
    for j in range(M):
        if listall[i][j+1] < X:
            #print(j,listall[i][j+1])
            flag=False
        if j==(M-1) and flag==True:
            ans.append(listall[i][0])

if len(ans)>0:
    print(int(min(ans)))
else:
    print("-1")
from collections import deque
n,m=map(int,input().split())
A=sorted(list(map(int,input().split())))
BC=sorted([list(map(int,input().split())) for i in range(m)],key=lambda x:x[1])

cnt=0
for b,c in BC[::-1]:
    for i in range(b):
        if A[0]<c:
            cnt +=c
            del A[0]
        else:break
print(cnt+sum(A))

### FIXED CODE ###

from collections import deque
n,m=map(int,input().split())
A=sorted(list(map(int,input().split())))
BC=sorted([list(map(int,input().split())) for i in range(m)],key=lambda x:x[1])

A=deque(A)
for b,c in BC[::-1]:
    if len(A)==0:break
    for i in range(b):
        if A[0]<c:
            A.append(c)
            A.popleft()
        else:break
print(sum(A))
a, b = map(int, raw_input().split())
s = ""

if a < b:
    s = "a < b"
elif a > b:
    s = "a > b"
else:
    s = "a == b"

print(s)

### FIXED CODE ###

a, b, c = map(int, raw_input().split())
print("Yes" if (a < b and b < c) else "No")
n = int(input())
ans = (n-1)*n*0.5
print(ans)


### FIXED CODE ###

s = input()
t = input()
count = 0
for i in range(3):
    if s[i] == t[i]:
        count += 1

print(count)
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IS(): return str(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")

A = II()
B = II()

print(A*B)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IS(): return str(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")

A = LI()

print(A[0]*A[1])
import sys
sys.setrecursionlimit(10000000)
import numpy as np
from heapq import heapify, heappop, heappush
import copy
from math import gcd, ceil
from collections import deque
# queueとして使う場合 push, popleftを使う
from bisect import bisect_left, bisect_right
# bisect_left: 配列の順序関係が崩れない条件で挿入することができる一番左の点
# bisect_right: 配列の順序関係が崩れない条件で挿入することができる一番右の点
# A = [1, 1, 1, 2, 2, 2, 4]
# print(bisect_left(A, 2))  # 3
# print(bisect_right(A, 2))  # 6
# print(bisect_left(A, 3))  # 6
# print(bisect_right(A, 3))  # 6


def main():
    S = input()
    max_num = 0
    num = 0
    for i in S:
        if i in ['A', 'T', 'G', 'C']:
            num += 1
            max_num = max(num, max_num)
        else:
            num = 0
    print(max_num)



if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
sys.setrecursionlimit(10000000)
import numpy as np
from heapq import heapify, heappop, heappush
import copy
from collections import deque
# queueとして使う場合 push, popleftを使う
from bisect import bisect_left, bisect_right
# bisect_left: 配列の順序関係が崩れない条件で挿入することができる一番左の点
# bisect_right: 配列の順序関係が崩れない条件で挿入することができる一番右の点
# A = [1, 1, 1, 2, 2, 2, 4]
# print(bisect_left(A, 2))  # 3
# print(bisect_right(A, 2))  # 6
# print(bisect_left(A, 3))  # 6
# print(bisect_right(A, 3))  # 6


def main():
    S = input()
    max_num = 0
    num = 0
    for i in S:
        if i in ['A', 'T', 'G', 'C']:
            num += 1
            max_num = max(num, max_num)
        else:
            num = 0
    print(max_num)



if __name__ == '__main__':
    main()
N,M=map(int,input().split())
a=list(map(int,open(0).read().split()))

b=[0]*(N+2)
b[0]=1
b[1]=1

for j in range(M):
    b[a[j]]=-1

for i in range(2,N+2):
    if b[i] !=-1:
        if b[i-1]!=-1:
            b[i]+=b[i-1]
        if b[i-2]!=-1:
            b[i]+=b[i-2]
print(b[-2]%(1000000007))

### FIXED CODE ###

N,M=[int(i) for i in input().split()]
a=[int(input()) for _ in range(M)]

b=[0]*(N+2)
b[0]=1
b[1]=1

for j in range(M):
    b[a[j]]=-1

for i in range(2,N+2):
    if b[i] !=-1:
        if b[i-1]!=-1:
            b[i]+=b[i-1]
        if b[i-2]!=-1:
            b[i]+=b[i-2]
print(b[-2]%(1000000007))
a=int(input())
b=list(input().split())
c=sorted(b)
for i in range (a):
	if c[i]==c[i+1]:
		print("No")
		break
	else:print("Yes")
	

### FIXED CODE ###

a=int(input())
b=list(input().split())
c=sorted(b)
count=0
for i in range (a-1):
	if c[i]==c[i+1]:
		count=1
		break
	
if count==1:
	print("NO")	
else:print("YES")
X=int(input())
a=100
import math
for i in range(1,1000000000000000000):
  a+=math.floor(0.01*a)
  if X<=a:
    print(i)
    

### FIXED CODE ###

X=int(input())
a=100
for i in range(1,10**18):
  s=int(0.01*a)
  a+=s
  if X<=a:
    print(i)
    break
data = [int(s) for in s input().split()]

if data[1] >= 13:
    print(data[0]):
elif data[1] >= 6:
    print(data[0]/2):
else:
    print(0)

### FIXED CODE ###

data = [int(s) for s in  input().split()]

if data[0] >= 13:
    print(data[1])
elif data[0] >= 6:
    print(int(data[1]/2))
else:
    print(0)
from math import gcd
n = int(input())
li = []
for i in range(n):
    s = input()
    if '.' in s:
        a, b = s.split('.')
        t = 10 ** len(b)
        li.append((int(a) * t + int(b), t))
    else:
        li.append((int(s), 1))
p = [[0] * 24 for _ in range(24)]
cnt = 0
for i in range(n):
    x, y = li[i]
    g = gcd(x, y)
    x //= g
    y //= g
    if y == 1:
        cnt += 1
    li[i] = x
    a1, b1 = 0, 0
    while x % 2 == 0:
        a1 += 1
        x //= 2
    while x % 5 == 0:
        b1 += 1
        x //= 5
    a2, b2 = 0, 0
    while y % 2 == 0:
        a2 += 1
        y //= 2
    while y % 5 == 0:
        b2 += 1
        y //= 5
    p[a1 - a2 + 9][b1 - b2 + 9] += 1
ans = 0
for i in range(0, 24):
    for j in range(0, 24):
        for a in range(max(0, 18 - i), 24):
            for b in range(max(0, 18 - j), 24):
                ans += p[i][j] * p[a][b]
print((ans - cnt) // 2)


### FIXED CODE ###

from math import gcd
n = int(input())
li = []
for i in range(n):
    s = input()
    if '.' in s:
        a, b = s.split('.')
        t = 10 ** len(b)
        li.append((int(a) * t + int(b), t))
    else:
        li.append((int(s), 1))
p = [[0] * 35 for _ in range(35)]
cnt = 0
for i in range(n):
    x, y = li[i]
    g = gcd(x, y)
    x //= g
    y //= g
    if y == 1:
        cnt += 1
    li[i] = x
    a1, b1 = 0, 0
    while x % 2 == 0:
        a1 += 1
        x //= 2
    while x % 5 == 0:
        b1 += 1
        x //= 5
    a2, b2 = 0, 0
    while y % 2 == 0:
        a2 += 1
        y //= 2
    while y % 5 == 0:
        b2 += 1
        y //= 5
    p[a1 - a2 + 9][b1 - b2 + 9] += 1
ans = 0
for i in range(0, 35):
    for j in range(0, 35):
        for a in range(max(0, 18 - i), 35):
            for b in range(max(0, 18 - j), 35):
                ans += p[i][j] * p[a][b]
print((ans - cnt) // 2)
import math
a, b, c=input().split(" ")
 
if math.sqrt(a) + math.sqrt(b) < math.sqrt(c):
  print("Yes)
else:
  print("No")

### FIXED CODE ###

import math
a, b, c=input().split(" ")
a = int(a) 
b = int(b)
c = int(c) 

if  4*a*b < (c-a-b)*(c-a-b) and (c-a-b)>0:
  print("Yes")
else:
  print("No")
a, b, c = map(int, raw_input().split())
num = [a, b, c]
num.sort()
for i in num
   print i

### FIXED CODE ###

a, b, c = map(int, raw_input().split())
num = [a, b, c]
num.sort()
print num[0], num[1], num[2]
def parse():
  N, K = map(int, input().split(" "))
  A = []
  for a in input().split(" "):
    A.append(int(a) - 1)
  return N, K, A

def main():
  N, K, A = parse()
  # print(N, K, A)

  # 経路の計算
  route = []
  next_town = A[0]
  town = 0
  while next_town != 0:  # 最初の街に戻るまで
    route.append(town)
    next_town = A[town]
    town = next_town
  
  print(route[K % len(route)] + 1)

if __name__ == "__main__":
  main()

### FIXED CODE ###


def parse():
  N, K = map(int, input().split(" "))
  A = []
  for a in input().split(" "):
    A.append(int(a) - 1)
  return N, K, A

def fast_pow(x, n):
    """
    O(log n)
    """
    if n == 0:
        return 1

    K = 1
    while n > 1:
        if n % 2 != 0:
            K *= x
        x *= x
        n //= 2

    return K * x

def fast_mod(x, N):
  # return x % N
  if N % 2 == 0:
    return x & (N - 1)
  else:
    return x % N

def main():
  N, K, A = parse()
  # print(N, K, A)

  # 移動
  town = 0
  route = [0]
  loop_start_index = None
  i = 0
  visited = [False for i in range(N)]
  visited[0] = True
  for i in range(K):
    # 次の町に移動
    town = A[town]

    if visited[town]:
      # ループ検出
      loop_start_index = route.index(town)
      break

    visited[town] = True
    route.append(town)

  if loop_start_index == None:
    print(town + 1)
  else:
    loop_route = route[loop_start_index:]
    # print(loop_route, K, i)
    print(loop_route[(K - (i + 1)) % len(loop_route)] + 1)
    # print(loop_route[])
  # print(town)
  exit(0)

  # 経路の計算
  route = []
  next_town = A[0]
  town = 0
  while not (next_town in route):  # 既出の町に行く場合
    route.append(town)
    next_town = A[town]
    town = next_town
  once_route = route[:route.index(next_town)]
  loop_route = route[route.index(next_town):]
  # print("once_route:", once_route)
  # print("loop_route:", loop_route)
  
  

  # print([town + 1 for town in route])
  # print("K %% len(loop_route):", K % len(loop_route))
  # print(route[K % len(loop_route) + len(once_route)] + 1)
  if K >= len(route) and len(once_route) > 0:
    # print("loop")
    loop_K = K - len(route)
    print(loop_route[fast_mod(loop_K, len(loop_route))] + 1)
    # print(loop_route[loop_K % len(loop_route)] + 1)
  else:
    # print("normal")
    # print(route[fast_mod(K, len(loop_route))] + 1)
    # print("K:", K)
    # print("K %% len(route):", K % len(route))
    print(route[fast_mod(K, len(route))] + 1)
    # print(route[K % len(route)] + 1)

if __name__ == "__main__":
  main()
S = list(input())
N = len(S)

mae = S[:(N-1)/2]
ushiro = S[(N+3)/2:]


for i in range(N):
    if S[i] == S[-(i+1)]:
        for j in range(len(mae)):
            if mae[j] != mae[-(j + 1)] or ushiro[j] != ushiro[-(j + 1)]:
                print("No")
                break


            else:
                print("Yes")
                break
        break




    else:
        print("No")
        break










### FIXED CODE ###

s = input()

#全体として回文になっているか
if s != s[::-1]:
    print("No")
    exit()

mae = s[:len(s)//2]#前半部分
ushiro = s[(len(s)+1)//2:]#後半部分

#前部分が回文になっているか
if mae != mae[::-1]:
    print("No")
    exit()

#後ろ部分が回文になっているか
if ushiro != ushiro[::-1]:
    print("No")
    exit()

print("Yes")
h,n=map(int,input().split())
ab = [list(map(int,input().split())) for i in range(n)]

dp=[float('inf')]*(h+1)
dp[0]=0
for i in range(h):
    for j in range(n):
		if dp[i] == float('inf'):continue
        next=i+ab[j][0] if i+ab[j][0]<=h else h
        dp[next]=min(dp[next],dp[i]+ab[j][1])
print(dp[-1])


### FIXED CODE ###

h,n=map(int,input().split())
a,b=[],[]
for i in range(n):
    A,B=map(int,input().split())
    a.append(A)#ダメージ量
    b.append(B)#消費魔力

dp=[float('inf')]*(h+1)
dp[0]=0
for i in range(h):
    for j in range(n):

        next=i+a[j] if i+a[j]<=h else h
        dp[next]=min(dp[next],dp[i]+b[j])
print(dp[-1])
h,w = map(int, input().split())
a = [list(input) for _ in range(h)]
dx = [1,0,-1,0]
dy = [0,1,0,-1]
for k in range(h):
    for j in range(w):
        x,y = k,j
        if a[x][y] == "#":
            for i in range(4):
                xi,yi = x+dx[i],y+dy[i]
                if 0 <= xi < h and 0 <= yi < w and a[xi][yi] == "#":
                    break
            else:
                print("No")
                exit()
 
print("Yes")

### FIXED CODE ###

n, m = map(int, input().split())
field = [list(input()) for i in range(n)]
flg = True
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
for i in range(n):
    for j in range(m):
        if field[i][j] == "#":
            f = 0
            for k in range(4):
            # 移動した後の点を (nx, ny) とする
                nx = i + dx[k]
                ny = j + dy[k]
                if 0 <= nx and nx < n and 0 <= ny and ny < m and field[nx][ny] == "#":
                    f += 1
            if f==False:
                flg = False
                
print("Yes" if flg else "No")
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.readline().split()]

    query_range = list(range(a, b + 1))
    print('aaa')
    sys.exit()
    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys

a, b, k = map(int, sys.stdin.readline().split())

def main():
    if k >= b - a + 1:
        res = list(range(a, b+1))
    else:
        res = set(range(a, a+k)) | set(range(b, b-k, -1))
        res = sorted(res)
    return res

if __name__ == '__main__':
    ans = main()
    print(*ans, sep='\n')
n = int(input())
a = [int(i) for i in input().split()]
a.sort()
count = 0
ans = []
for i in range(n):
  for j in range(n-1):
    if j >= i:
      if a[j]-a[i] <= 2:
        #print(i,j)
        count += 1
      else:
        if count != 0:
          ans.append(count)
        count = 0
        i += 1
    else:
      continue
#print(ans)
if n == 1:
  print(1)
else:
  print(max(ans))

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]
a.sort()
count = 0
p1 = []
for i in range(n):
  p1.append(a[i]-1)
p2 = []
for i in range(n):
  p2.append(a[i]+1)
chk = a+p1+p2
chk.sort()
#print(chk)
ans =[]
count = 0
for i in range(3*n-1):
  if chk[i+1] == chk[i]:
    count += 1
  else:
    ans.append(count)
    count = 0
print(max(ans)+1)
from math import factorial as fc

MOD=10**9+7
n,k=map(int,input().split())

for i in range(1,k+1):
    b=fc(n-k+1)//fc(i)//fc(n-k+1-i)
    r=fc(k-1)//fc(i-1)//fc(k-1-(i-1))
    print(b%MOD*r%MOD)



### FIXED CODE ###

from math import factorial as fc

MOD=10**9+7
n,k=map(int,input().split())

for i in range(1,k+1):
    if n-k+1<i:
        print(0)
        continue
    b=fc(n-k+1)//fc(i)//fc(n-k+1-i)
    r=fc(k-1)//fc(i-1)//fc(k-1-(i-1))
    print(b%MOD*r%MOD)
N = int(input())
 
t = map(int, input().split())
 
M = int(input())
 
cal = sum(t)
 
for j in range(M):
    p, x = map(int, input().split())
    print(cal - t[[p] - 1] + x)

### FIXED CODE ###

N = int(input())
 
t = list(map(int, input().split()))
 
M = int(input())
 
cal = sum(t)
 
for j in range(M):
    p, x = map(int, input().split())
    print(cal - t[p - 1] + x)
N = int(input())
a={}
for i in range(N):
  a += input()
print(len(a))

### FIXED CODE ###

N = int(input())
l = []
c = 0
for i in range(N):
  s = input()
  l.append(s)

a = set(l)
print(len(a))
a,b,c=map(int,input().split())
if a==b==C:
    print(1)
elif a==b or b==c or c==a:
    print(2)
else:
    print(3)


### FIXED CODE ###

a,b,c=map(int,input().split())
li=[a,b,c]
li.sort()

if a==b==c:
    print(1)

elif li[0]==li[1] or li[1]==li[2]:
    print(2)
else:
    print(3)
import sys

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))  # applies to numbers only
rs = lambda: stdin.readline().rstrip()  # ignores trailing space

#人は0からN-1,言語は1からMまで
N, M = rl()
KL = [rl() for _ in range(N)]
speak_lan = [[] for _ in range(M+1)] #0は使わない
for i, x in enumerate(KL):
    k, *lan = x
    for l in lan:
        speak_lan[l].append(i)

communicate = set()

def dfs(person):
    global communicate
    lan = KL[person][1:]
    for l in lan:
        for p in speak_lan[l]:
            if p not in communicate:
                communicate.add(p)
                dfs(p)

dfs(0)
if len(communicate) == N:
    print('YES')
else:
    print('NO')



### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 7)

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))  # applies to numbers only
rs = lambda: stdin.readline().rstrip()  # ignores trailing space

#人は0からN-1,言語は1からMまで
N, M = rl()
KL = [rl() for _ in range(N)]
speak_lan = [[] for _ in range(M+1)] #0は使わない
for i, x in enumerate(KL):
    k, *lan = x
    for l in lan:
        speak_lan[l].append(i)

communicate = set()
used_language = set()
def dfs(person):
    global communicate
    global used_language
    lan = KL[person][1:]
    for l in lan:
        if l in used_language:
            continue
        used_language.add(l)
        for p in speak_lan[l]:
            if p not in communicate:
                communicate.add(p)
                dfs(p)

dfs(0)
if len(communicate) == N:
    print('YES')
else:
    print('NO')
n = input()
a = list(map(int,input().split()))

 print(max(a)-min(a))


### FIXED CODE ###

n = input()
a = list(map(int,input().split()))
print(max(a)-min(a))
D,N = map(int, input().split())

if N == 100:
	print(101 * (100 ** d))
else:
	print(n * (100 ** d))

### FIXED CODE ###

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

if N == 100:
	print(101 * (100 ** D))
else:
	print(N * (100 ** D))
x,a,b=map(int,input().split())
if b-a=<0:
  print('delicious')
elif b-a=<x and not b-a=<0:
  print('safe')
else:
  print('dangerous')


### FIXED CODE ###

x,a,b=map(int,input().split())
if 0>=b-a:
  print('delicious')
elif x>=b-a and b-a>0:
  print('safe')
else:
  print('dangerous')
N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
    
def lcm(a, b):
	return a * b // gcd (a, b)

result = lcm(T[0],T[1])

for x in range(2,N):
    result = lcm(result, T[x])

print(result)
    


### FIXED CODE ###

N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
    
def lcm(a, b):
	return a * b // gcd (a, b)
if N == 1:
    print(T[0])
else:
    result = lcm(T[0],T[1])

    for x in range(2,N):
        result = lcm(result, T[x])

    print(result)
n=int(input())
l=list(map(str,input().split()))
lis=[0]
count=0
for i in range(n):
  if l[i]='D':
    lis.append(count-1)
    count-=1
  else:
    lis.append(count+1)
    count+=1
print(max(lis))

### FIXED CODE ###

n=int(input())
l=list(map(str,input()))
count=0
lis=[0]
for i in range(n):
    if  l[i]=='D':
        lis.append(count-1)
        count-=1
    else:
        lis.append(count+1)
        count+=1
print(max(lis))
from collections import defaultdict


def main():
    N = int(input())
    XY = [list(map(int, input().split())) for _ in range(N)]

    dd = defaultdict(int)
    for i in range(N - 1):
        for j in range(i + 1, N):
            a = (XY[j][0] - XY[i][0], XY[j][1] - XY[i][1])
            dd[a] += 1

    pq = max(dd, key=dd.get)

    cnt = 0
    for x, y in XY:
        if [x + pq[0], y + pq[1]] in XY:
            cnt += 1

    print(N - cnt)


main()


### FIXED CODE ###

import itertools
from collections import defaultdict


def main():
    N = int(input())
    if N == 1:
        print(1)

    else:
        XY = [list(map(int, input().split())) for _ in range(N)]

        dd = defaultdict(int)

        for xy1, xy2 in itertools.combinations(XY, 2):
            a = (xy2[0] - xy1[0], xy2[1] - xy1[1])
            b = (-a[0], -a[1])
            dd[a] += 1
            dd[b] += 1

        print(N - max(dd.values()))


main()
import bisect
n, m = map(int, input().split())
AB = [[int(i) for i in input().split()] for i in range(m)]
S = []
G = []

for ab in AB:
    if ab[0] == 1:
        S.append(ab[1])
    if ab[1] == n:
        G.append(ab[0])

S.sort()
G.sort()
        
ans = 'IMPOSSIBLE'
if len(G) != 0:
    for s in S:
        idx = bisect.bisect_left(G, s)
        if s == G[idx]:
            ans = 'POSSIBLE'
print(ans)

### FIXED CODE ###

n, m = map(int, input().split())
S = set()
G = set()

for i in range(m):
    s, g = map(int, input().split())
    if s == 1:
        G.add(g)
    if g == n:
        S.add(s)

if len(S&G) != 0:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
x=input('X')
y=input('Y')
int_x=int(x)
int_y=int(y)
a=(int_x+int_y)/2
print(a)

### FIXED CODE ###

s=input().split()
x=int(s[0])
y=int(s[1])
a=x+y/2
print(int(a))
import sys
sys.setrecursionlimit(10**6)

N,M=map(int, sys.stdin.readline()..split())

nl=[ [] for i in range(N+1) ] 
f=[ 0 for i in range(N+1) ]
dp=[ 0 for i in range(N+1) ]

for i in range(M):
	x,y=map(int, sys.stdin.readline()..split())
	nl[x].append(y)
	f[y]=1

start=[]
for i in range(1,N+1):
	if f[i]==0:
		start.append(i)


def dfs(v):
	for u in nl[v]:
		dp[u]=max( dp[u], dp[v]+1)
		dfs(u)


for s in start:
	dfs(s)

print max(dp)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

N,M=map(int, sys.stdin.readline().split())

nl=[ [] for i in range(N+1) ] 

for i in range(M):
	x,y=map(int, raw_input().split())
	nl[x].append(y)


memo={}

def depth(n):
	if n in memo: return memo[n]
	ret=0
	if len( nl[n] )==0:
		return 0
	else:
		for x in nl[n]:
			ret=max(ret, depth(x)+1)
	memo[n]=ret
	return ret


ans=0
for i in range(1,N+1):
	ans=max( ans , depth(i) )

print ans
import sys
N = int(sys.stdin.readline().rstrip())

if N == 1:
  h = int(sys.stdin.readline().rstrip())
else:
  h = list(map(int, sys.stdin.readline().rstrip().split()))

L = N
if L == 0:
  ans = 0
elif L < 1:
  ans = N - h[0]
elif L < 2:
  ans = N - max(h)
  
else:
  grad1 = h[0] > h[1]
  p= 0
  v= 0
  if grad1:
    p += h[0]

  for n in range(2, L):
    grad2 = h[n-1] > h[n] 
    if grad1 == grad2:
      continue
    elif grad2:
      p += h[n-1]
    else:
      v += h[n-1]
    grad1 = grad2
               
  if not grad1:
    p += h[n]
 
ans = p - v
print(ans)

### FIXED CODE ###

import sys
L = int(sys.stdin.readline().rstrip())
 
h = list(map(int, sys.stdin.readline().rstrip().split()))
 
if L == 0:
  ans = 0
elif L == 1:
  ans = h[0]
elif L == 2:
  ans = max(h)
  
else:
  grad1 = h[0] > h[1]
  p= 0
  v= 0
  if grad1:
    p += h[0]
 
  for n in range(2, L):
    grad2 = h[n-1] > h[n] 
    if grad1 == grad2:
      continue
    elif grad2:
      p += h[n-1]
    else:
      v += h[n-1]
    grad1 = grad2
               
  if not grad1:
    p += h[n]
 
  ans = p - v
print(ans)