Harryxun/stf_run huggingface dataset:
n, m = [int(i) for i in input().split()]
fibo_l = [1, 1] + [None] * n
a = [int(input()) for i in range(m)]

def fibo(x):
    if x not in a and x >= 0:
            if fibo_l[x] is None:
                fibo_l[x] = fibo(x - 1) + fibo(x - 2)
                return fibo_l[x]
            else: return fibo_l[x]
    else: return 0
    
print(fibo(n) % 1_000_000_007)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)

n, m = [int(i) for i in input().split()]
fibo_l = [1] + [None] * n
a = set([int(input()) for i in range(m)])

def fibo(x):
    if x not in a and x >= 0:
            if fibo_l[x] is None:
                fibo_l[x] = fibo(x-1) % 1000000007 + fibo(x-2) % 1000000007
            return fibo_l[x]
    else: return 0
    
print(fibo(n) % 1000000007)
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if b-a<k:
  if c-a<k:
    if d-a<k:
      if e-a<k:
        print("Yay!")
      else:
        print(":(")
        break
    else:
      print(":(")
      break
  else:
    print(":(")
    break
else:
  print(":(")
  break
 

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e-a<=k:
  print("Yay!")
else:
  print(":(")
import bisect

n, m = map(int, input().split())
ls = sorted(map(int, input().split()))
ls2 = [list(map(int, input().split())) for _ in range(m)]
ls2.sort(key=lambda x: (x[1], x[0]), reverse=True)
left = 0
res = 0
for b, c in ls2:
    if c <= ls[left]:
        break
    i = bisect.bisect(ls[left:], c)
    i = min(i, b)
    res += c * i
    left += i
print(res + sum(ls[left:]))

### FIXED CODE ###

n, m = map(int, input().split())
ls = sorted(map(int, input().split()))
ls2 = [list(map(int, input().split())) for _ in range(m)]
ls2.sort(key=lambda x: (x[1], x[0]), reverse=True)
left = 0
right = 0
index = 0
res = 0
while left < n:
    if index == len(ls2):
        break
    b, c = ls2[index]
    if c <= ls[left]:
        break
    right = left + 1
    while right <= n:
        if right == n:
            res += c * (right - left)
            break
        if ls[right] <= c and right - left < b:
            right += 1
        else:
            res += c * (right - left)
            break
    left = right
    index += 1

print(res + sum(ls[left:]))
# coding: utf-8

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

if a*b % 2 == 0:
	print("Even")
eles:
	print("Odd")

### FIXED CODE ###

# coding: utf-8
 
a, b = map(int, input().split())
 
if a*b % 2 == 0:
	print("Even")
else:
	print("Odd")
s = input()
if not s[1]==s[2]==s[3]:
    print('No')
else:
    print('Yes')

### FIXED CODE ###

s = input()
if s=='AAA' or s=='BBB':
    print('No')
else:
    print('Yes')
D,N=(int(i) for i in input().split())

if N != 100
    print(100**D*N)
else:
    print(100**D*101)

### FIXED CODE ###

D,N=(int(i) for i in input().split())

if N != 100:
    print(100**D*N)
else:
    print(100**D*101)
import numpy as np

def gcd_(a, b):
    a_ = max(a, b)
    b_ = min(a, b)

    while True:
        if a_ % b_ == 0:
            return b_
        a_, b_ = b_, a_ % b_

_ = input()
a = np.array([int(x) for x in input().split(" ")])

if len(a) == 2:
    print(gcd_(*a))
    exit()

list = [gcd_(a[2], a[1]), gcd_(a[0], a[2]), gcd_(a[0], a[1])]
gcd = np.max(list)
bad_num = a[np.argmax(list)]

for i in range(3, len(a)):
    if a[i] % gcd == 0:
        continue
    else:
        newgcd = gcd_(a[i], gcd)
        oldgcd = gcd_(bad_num, gcd)

        if newgcd > oldgcd:
            gcd = newgcd
        else:
            gcd = oldgcd
            bad_num = a[i]


print(int(gcd))


### FIXED CODE ###

a, b, t = [int(x) for x in input().split(" ")]

print(b * int(t / a))
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c/A_
print(int(a%w))

### FIXED CODE ###

import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c//A_
print(int(a%w))
class UnionFind:
    def __init__(self, n):
        self.parents = [i for i in range(n + 1)]

    def root(self, i):
        if self.parents[i] == i:
            return i
        else:
            self.parents[i] = self.root(self.parents[i])
            return self.parents[i]

    def unite(self, i, j):
        self.parents[self.root(self.parents[i])] = self.root(j)

    def is_unite(self, i, j):
        return self.root(i) == self.root(j)


from collections import Counter


def solve(N, M, ABs):
    uf = UnionFind(N)
    counter = Counter([i + 1 for i in range(N)])
    ans = []

    tans = N * (N - 1)
    for a, b in ABs[::-1]:
        ans.append(str(tans // 2))

        if not uf.is_unite(a, b):
            ar = uf.root(a)
            br = uf.root(b)
            ar, br = min(ar, br), max(ar, br)

            tans -= counter[ar] * (N - counter[ar])
            tans -= counter[br] * (N - counter[br])
            counter[br] += counter[ar]
            tans += counter[br] * (N - counter[br])

            del counter[ar]
            uf.unite(a, b)
    return "\n".join(ans[::-1])

if __name__ == "__main__":
    N, M = tuple(map(int, input().split(" ")))
    ABs = [tuple(map(int, input().split(" "))) for _ in range(M)]
    print(solve(N, M, ABs))


### FIXED CODE ###

import sys
sys.setrecursionlimit(100000)

class UnionFind:
    def __init__(self, n):
        self.parents = [i for i in range(n + 1)]

    def root(self, i):
        if self.parents[i] == i:
            return i
        else:
            self.parents[i] = self.root(self.parents[i])
            return self.parents[i]

    def unite(self, i, j):
        self.parents[self.root(self.parents[i])] = self.root(j)

    def is_unite(self, i, j):
        return self.root(i) == self.root(j)


from collections import Counter


def solve(N, M, ABs):
    uf = UnionFind(N)
    counter = Counter([i + 1 for i in range(N)])
    ans = []
    tans = N * (N - 1)
    for a, b in ABs[::-1]:
        ans.append(str(tans // 2))

        if not uf.is_unite(a, b):
            ar = uf.root(a)
            br = uf.root(b)

            tans -= counter[ar] * (N - counter[ar])
            tans -= counter[br] * (N - counter[br])
            counter[br] += counter[ar]
            tans += counter[br] * (N - counter[br])

            uf.unite(a, b)
    return "\n".join(ans[::-1])

if __name__ == "__main__":
    N, M = tuple(map(int, input().split(" ")))
    ABs = [tuple(map(int, input().split(" "))) for _ in range(M)]
    print(solve(N, M, ABs))
def main()
    mod = 10**9+7
    N = int(input())
    a = [list(map(int, input().split())) for _ in range(N)]
    dp = [0]*(1<<N)
    dp[0] = 1
    def bitcount(i): # i < 2^32
        i = i - ((i >> 1) & 0x55555555)
        i = (i & 0x33333333) + ((i >> 2) & 0x33333333)
        return (((i + (i >> 4) & 0xF0F0F0F) * 0x1010101) & 0xffffffff) >> 24
    for s in range(1, 1<<N):
        women = []
        m = bitcount(s)-1
        for w in range(N):
            if a[m][w] == 1 and s&1<<w:
                dp[s]+=dp[s^(1<<w)]
                dp[s]%=mod
    print(dp[-1])
main()

### FIXED CODE ###

mod = 10**9+7
N = int(input())
a = [list(map(int, input().split())) for _ in range(N)]
dp = [0]*(1<<N)
dp[0] = 1
for s in range(1, 1<<N):
    women = []
    for i in range(N):
        if (1<<i)&s:
            women.append(i)
    m = len(women)-1
    for w in women:
        if a[m][w] == 1:
            dp[s]+=dp[s^(1<<w)]
            dp[s]%=mod
print(dp[-1])
import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
C=[1]*n
Ans=[C]
cur=n-1
while cur:
  cur=0
  m=1
  for i in range(n-1):
    if C[i+1]<i+2:
      cur=i+1
  for i in range(cur):
    m=max(m,C[i])
  D=[]
  if C[cur]+1>m+1:
    cur-=1
  for i in range(n):
    if i<cur:
      D.append(C[i])
    elif i==cur:
      D.append(C[i]+1)
    else:
      D.append(1) 
  if cur!=0:
    Ans.append(D)
  C=Ans[-1]
for a in Ans:
  ans=""
  for i in range(n):
    ans+=chr(a[i]+96)
  print(ans)


### FIXED CODE ###

import sys
input=lambda: sys.stdin.readline().rstrip()
A=input()
B=input()
C=input()

a,b,c=len(A),len(B),len(C)

def f(X,Y):
  XY=[True]*(10**4)
  x,y=len(X),len(Y)
  for i in range(5000-y+1,5000+x):
    ret=True
    if i<=5000:
      for j in range(min(x,y+i-5000)):
        if X[j]=="?" or Y[j-i+5000]=="?" or X[j]==Y[j-i+5000]:
          continue
        else:
          ret=False
    else:
      for j in range(min(y,x-i+5000)):
        if Y[j]=="?" or X[j+i-5000]=="?" or Y[j]==X[j+i-5000]:
          continue
        else:
          ret=False
    XY[i]=ret
  return XY
AB=f(A,B)
BC=f(B,C)
AC=f(A,C)
ans=a+b+c
for i in range(5000-b-c,5000+a+c):
  for j in range(5000-b-c,5000+a+b):
    if -4000<=j-i<=4000:
      if AB[i] and AC[j] and BC[j-i+5000]:
        l=min(5000,i,j)
        r=max(i+b,j+c,5000+a)
        ans=min(ans,r-l)
    else:
      if AB[i] and AC[j]:
        l=min(5000,i,j)
        r=max(i+b,j+c,5000+a)
        ans=min(ans,r-l)
print(ans)
s = list(input())
t = list(input())
count = 0
for i in range(2):
  if s[i]=t[i]:count+=1
print(count)

### FIXED CODE ###

s = list(input())
t = list(input())
count = 0
for i in range(3):
  if s[i] == t[i]:
    count+=1
print(count)
import numpy as np

N, *arr = map(int, input().split())
arr = np.array(arr)
arr.sort()
m1 = arr[int(N / 2 - 1)]
m2 = arr[int(N / 2)]
print(m2 - m1)

### FIXED CODE ###

import numpy as np

N = int(input())
arr = [int(i) for i in input().split()]
arr = np.sort(arr)
m1 = arr[int(N / 2)-1]
m2 = arr[int(N / 2)]
print(m2 - m1)
from sys import stdin

N = int(input())
sum = 0
for i in N:
  x,u = stdin.readline().rstrip().split()
  if u == 'JPY':
    sum += int(x)
  else:
  	sum += float(x)*380000
print(sum)


### FIXED CODE ###

N = int(input())
sum = 0
for i in range (N):
  X = input().split()
  if X[1] == 'JPY':
    sum += float(X[0])
  else:
  	sum += float(X[0])*380000
print(sum)
def main():
    from itertools import product

    n, *xyh = map(int, open(0).read().split())
    a = range(101)

    if n - xyh[2::3].count(0) == 1:
        i = xyz[2::3].index(1)
        print(xyh[i])
        return
    a = range(101)
    for x, y in product(a, a):
        l = None
        for i, j, h in zip(*[iter(xyh)] * 3):
            ll = h + abs(x - i) + abs(y - j)
            if l:
                if ll != l:
                    break
            else:
                l = ll
        else:
            print(x, y, l)
            return


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    from itertools import product

    n, *xyh = map(int, open(0).read().split())
    a = range(101)

    if n - xyh[2::3].count(0) == 1:
        i = xyh[2::3].index(1)
        print(xyh[3*i], xyh[3*i+1], xyh[3*i+2])
        return
    a = range(101)
    for x, y in product(a, a):
        l = None
        for i, j, h in zip(*[iter(xyh)] * 3):
            if h == 0:
                continue
            ll = h + abs(x - i) + abs(y - j)
            if l:
                if ll != l:
                    break
            else:
                l = ll
        else:
            print(x, y, l)
            return


if __name__ == '__main__':
    main()
n = int(input())

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

ans = 0

for i in range(n):
    for j in range(n):
            for k in range(n):
                if a[i] < b[j] < c[k]:
                    ans = ans + 1

print(ans)

### FIXED CODE ###

a = input()
b = input()
if a[::-1] == b:
    print('YES')
else:
    print('NO')
r = int(input())
pi = 3.14159265359
print("{:f}".format(pi*r**2),"{:f}".format(2*pi*r))

### FIXED CODE ###

r = float(input())
pi = 3.14159265359
print("{:f}".format(pi*r**2),"{:f}".format(2*pi*r))
N,M=map(int,input().split())
p=[0]*N
S=[0]*N
sei=[0]*N
pena=[0]*N
total=[0]*N

for i in range(M):
  p[i],S[i] = input().split()
  p[i]=int(p[i])

  if S[i]=="AC":
    if sei[p[i]]>=1:
      pass
    else:
      sei[p[i]] +=1
      
  else: # WAのとき
    if sei[p[i]]>=1:
      pass
    else: #0のとき
      pena[p[i]] +=1

for j in range(N):
  total[j]=sei[j]*pena[j]
  
print(sum(sei),sum(total))

### FIXED CODE ###

N,M=map(int,input().split())
p=[0]*M
S=[0]*M
sei=[0]*N
pena=[0]*N
total=[0]*N

for i in range(M):
  p[i],S[i] = input().split()
  p[i]=int(p[i])

  if S[i]=="AC":
    if sei[p[i]-1]>=1:
      pass
    else:
      sei[p[i]-1] +=1
      
  else: # WAのとき
    if sei[p[i]-1]>=1:
      pass
    else: #0のとき
      pena[p[i]-1] +=1

for j in range(N):
  total[j]=sei[j]*pena[j]
  
print(sum(sei),sum(total))
X, Y, A, B, C = list(map(int,input().split()))
p = list(map(int,input().split()))
q = list(map(int,input().split()))
r = list(map(int,input().split()))

p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)

Z = 0
while True:
  if max(p[X - 1], q[Y - 1], r[Z]) == r[Z]:
    if p[X - 1] < q[Y - 1]:
      X -= 1
      Z += 1
    else:
      Y -= 1
      Z += 1
  else:
    break

print(sum(p[:X]) + sum(q[:Y]) + sum(r[:Z]))

### FIXED CODE ###

X, Y, A, B, C = list(map(int,input().split()))
p = list(map(int,input().split()))
q = list(map(int,input().split()))
r = list(map(int,input().split()))
 
p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)
 
p.append(float("inf"))
q.append(float("inf")) 

Z = 0
while Z < C:
  if min(p[X - 1], q[Y - 1]) < r[Z]:
    if p[X - 1] < q[Y - 1]:
      X -= 1
      Z += 1
    else:
      Y -= 1
      Z += 1
    continue
  break
 
print(sum(p[:X]) + sum(q[:Y]) + sum(r[:Z]))
a,b=map(int,input().split())
n=[a+b,a*b,a-b]
n.sorted()
print(n[-1])

### FIXED CODE ###

a,b=map(int,input().split())
n=[a+b,a*b,a-b]
n.sort()
print(n[-1])
HW=input().split()
map(int(), HW)
print('#'*HW[1])
for i in range(HW[0]-2):
  print('#',end='')
  print('.'*(HW[1]-2),end='"')
print('#'*HW[1])
print()

### FIXED CODE ###

while True:
  HW=input().split()
  HW=[int(x) for x in HW]
  if HW[0] == 0: break
  print('#'*HW[1])
  for i in range(HW[0]-2):
    print('#',end='')
    print('.'*(HW[1]-2),end='#')
    print()
  print('#'*HW[1])
  print()
N=int(input())
T_N=int(input().split())
list_time = []
for i in range(N):
    list_time.append(T_N[i])
#Ti秒の総和を求める
sum=sum(list_time)
print(sum)
M=int(input())
for i in range(M):
    p,x=map(int,input().split())
    #ドリンク飲んだ時と飲まないときの差を元の合計に足す。
    ans=sum+x-list_time[p-1]
    print(ans)

### FIXED CODE ###

A,op,B=input().split()
a=int(A)
b=int(B)
 
if op == "+" :
    print(a+b)
  
elif op == "-" :
    print(a-b)
w, h, n = input().split()              
w, h, n = int(w), int(h), int(n)       
x = []                                 
y = []                                 
a = []                                 
                                       
for _ in range(n):                     
    x_, y_, a_ = input().split()       
    x.append(int(x_))                  
    y.append(int(y_))                  
    a.append(int(a_))                  
W = w                                  
H = h                                  
w_r = w                                
w_l = 0                                
h_u = h                                
h_l = 0                                
for i in range(n):                     
    if a[i] is 1 and x[i]>w_l:         
        w_l = x[i]                     
    if a[i] is 2 and x[i]<w_r:         
        w_r = x[i]                     
    if a[i] is 3 and y[i]>h_l:         
        h_l = y[i]                     
    if a[i] is 4 and y[i]<h_u:         
        h_u = y[i]                     
                                       
ans = (w_r - w_l)*(h_u - h_l)          
if (w_r - w_l) < 0 or (h_u - h_l) < 0: 
    ans = 0                            
print(ans)                             


### FIXED CODE ###

a, b, c = input().split()        
a, b, c = int(a), int(b), int(c) 
fl = False                       
ab = a+b                         
ac = a+c                         
bc = b+c                         
while(1):                        
    if ab == c:                  
        fl = True                
        break                    
    if bc == a:                  
        fl = True                
        break                    
    if ac == b:                  
        fl = True                
        break                    
    break                        
if fl:                           
    print('Yes')                 
else:                            
    print('No')
n = int(input())
a = map(int,input().split())
for i in range(1,n):
    key = a[i]
    j = i-1
    while j >=0 and a[j] > key:
        a[j+1] = a[j]
        j -= 1
    a[j+1] = key
    print(' '.join(map(str,a)))

### FIXED CODE ###

n = int(input())
lst = list(map(int,input().split()))
for i in range(n):
    key = lst[i]
    j = i-1
    while j >= 0 and lst[j] > key:
        lst[j+1] = lst[j]
        j -= 1
    lst[j+1] = key
    print(' '.join(map(str,lst)))
from math import sqrt

def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while a % b > 0:
        a, b = b, a%b
    return b

def divisor(a):
    lim = int(sqrt(a))
    divset = set()
    for i in range(1, lim + 1):
        if a % i == 0:
            divset |= {i, a//i}
    divset -= {1}
    return divset

def is_prime(a):
    lim = int(sqrt(a))
    for i in range(2, lim + 1):
        if a != i and a % i == 0: return False
    else: return True

N = int(input())
A = [int(input()) for n in range(N+1)]

gcd_of_A = A[N]
for i in reversed(range(N)):
    if A[N] != 0:
        gcd_of_A = gcd(abs(A[i]), gcd_of_A)

primes = [int(i) for i in range(2, N+1)]
primes = set(primes)
for i in range(2, N+1):
    temp = set()
    for p in primes:
        if p % i > 0 or p == i: temp |= {p}
    primes = temp

ans = []
for p in primes:
    for i in range(p-1):
        coefficient = 0
        index_a = i
        while index_a <= N:
            coefficient += A[index_a] % p
            coefficient %= p
            index_a += p-1
        if coefficient % p > 0: break
    else: 
        ans.append(p)
        
if gcd_of_A > 1:
    divisor_of_A = divisor(gcd_of_A)
    for d in divisor_of_A:
        if d > N:
            if is_prime(d):
                ans.append(d)

ans.sort()
for a in ans: print(a)

### FIXED CODE ###

def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while a % b > 0:
        a, b = b, a%b
    return b

def divisor(a):
    i = 1
    divset = set()
    while i * i <= a:
        if a % i == 0: divset |= {i, a//i}
        i += 1
    divset.remove(1)
    return divset

def is_prime(a):
    if a <= 3: 
        prime = [False, False, True, True]
        return prime[a]
    i = 2
    while i * i <= a:
        if a % i == 0: return False
        i += 1
    else: return True

N = int(input())
A = [None] * (N+1)
for i in reversed(range(N+1)):
    A[i] = int(input())

primes_bool = [True] * (N + 1)
primes = []
for p in range(2, N+1):
    if primes_bool[p]:
        primes.append(p)
        p_mult = p * 2
        while p_mult <= N:
            primes_bool[p_mult] = False
            p_mult += p

ans = []
used = set()
gcd_of_A = abs(A[N])
for a in A[:N]:
    if a != 0: gcd_of_A = gcd(abs(a), gcd_of_A)

commondiv = divisor(gcd_of_A)
for d in commondiv:
    if d > 1 and is_prime(d): 
        ans.append(d)
        used |= {d}

for p in primes:
    if A[0] % p == 0:
        for i in range(1, p):
            coefficient = 0
            index_a = i
            while index_a <= N:
                coefficient += A[index_a]
                coefficient %= p
                index_a += p-1
            if coefficient > 0: break
        else:
            if p not in used: ans.append(p)

ans.sort()
for a in ans: print(a)
import math
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

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

a = abs(a)
b = abs(b)

if a > b:
    w = a
    a = b
    b = a

# 鬼と逃げる人がぶつかる場所
meetingplace = int(lcm(a, b) + lcm(v, w))

requiredtime = int((meetingplace - v) / a) // v

if v > w:
    if t >= requiredtime:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

### FIXED CODE ###

a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if v > w:
    # 1秒あたり距離はv-wだけ縮まる
    # t秒の時の距離は(v-w)*t
    # それが|a-b| の距離に間に合うor追い越せるかどうか
    if abs(a - b) <= (v - w) * t:
    # if t <= abs(a - b):
        print("YES")
    else:
        print("NO")
else:
    print("NO")
A,B,K=map(int,input().split())
i=1
j=2
if A%j=0 and B%j=0 and i<K:
  i+=1
  j+=1
print(j)

### FIXED CODE ###

A,B,K=map(int,input().split())
i=0
j=1
a=[]
while j<=max(A,B):
    if A%j==0 and B%j==0:
        a.append(j)
    j+=1
print(a[-K])
c = input()
S = 'abcdefghijklmnopqrstuwxy'
f = S.find(c)
print (S[f+1])

### FIXED CODE ###

c = input()
S = 'abcdefghijklmnopqrstuvwxyz'
f = S.find(c)
print (S[f+1])
for i in range(5):
  L[i]=int(input())
  
k=int(input())

for i in range(4):
  if L[i+1]-L[i]>k:
    print(':(')
    break
  
  if i==3:
    print(Yay!)
  

### FIXED CODE ###

import sys
L=[0 for i in range(5)]
for i in range(5):
  L[i]=int(input())
  
k=int(input())

for i in range(4):
  for j in range(i+1,5):
    if L[j]-L[i]>k:
      print(':(')
      sys.exit()
  
    if i==2 and j==3:
      print('Yay!')
a = input("input a: ")
a = int(a)
b = input("input b: ")
b = int(b)
print( a, b )
area = a*b
line = 2*a + 2*b
print( area, line )

### FIXED CODE ###

a, b = map(int, input().split())
print ( a*b, 2*a+2*b )
N = int(input())
T, A = map(int, input().split())
palace = [abs(T - (int(x)*0.006) -A) for x in input().split('')]
print(palace.index(min(min(palace)+1)))

### FIXED CODE ###

N = int(input())
T, A = map(int, input().split())
palace = [abs(T - (int(x)*0.006) - A) for x in input().split()]
print(palace.index(min(palace))+1)
n = int(input())
v = list(map(int, input().split()))
 
for i in range(n-1):
	mn1 = v.remove(min(v))
	mn2 = v.remove(min(v))
	v.append((mn1 + mn2) / 2)
 
print(v[0])


### FIXED CODE ###

n = int(input())
v = list(map(int, input().split()))
 
for i in range(n-1):
  mn1 = min(v)
  v.remove(min(v))
  mn2 = min(v)
  v.remove(min(v))
  v.append((mn1 + mn2) / 2.0)
 
print(v[0])
while 1:
H , W = map(int, raw_input().split())
if H == 0 and W == 0:
  break
for _  in range(H):
  print ("#" * W + "\n")

    

### FIXED CODE ###

while 1:
  h, w = map(int, raw_input().split())
  if h == 0 and w == 0:
    break
  for i in range(h):
    print "#" * w
  print""
n,t=map(int,input().split())
l=[]
m=[]
for i in range(1,n+1):
  p,q=map(int,input().split())
  if q<=t:
    l[i]=p
    m[i]=q
  else:
    pass
if len(l)==0:
  print("TLE")
else:
  print(min(l))
  


### FIXED CODE ###

n,t=map(int,input().split())
l=[]
for i in range(1,n+1):
  p,q=map(int,input().split())
  if q<=t:
    l.append(p)
  else:
    pass
if len(l)==0:
  print("TLE")
else:
  print(min(l))
def gcd(a, b):
    """Return greatest common divisor using Euclid's Algorithm."""
    while b:      
        a, b = b, a % b
    return a

def lcm(a, b):
    """Return lowest common multiple."""
    return a * b // gcd(a, b)

N = int(input())
if N > 1:
    T = int(input())
for i in range(1, N):
    T = lcm(int(input()), T)
print(T)

### FIXED CODE ###

def gcd(a, b):
    """Return greatest common divisor using Euclid's Algorithm."""
    while b:      
        a, b = b, a % b
    return a

def lcm(a, b):
    """Return lowest common multiple."""
    return a * b // gcd(a, b)

N = int(input())
T = int(input())
for i in range(1, N):
    T = lcm(int(input()), T)
print(T)
W,a,b = map(int, input().split())

if (a <= b <= a+W) or (a <= b+W <= a+W) or :
    print(0)
else:
    if a+W < b:
        print(abs(b-(a+W)))
    elif b+W < a:
        print(abs(a-(b+W)))

### FIXED CODE ###

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

if (a <= b <= a+W) or (a <= b+W <= a+W):
    print(0)
else:
    if a+W < b:
        print(abs(b-(a+W)))
    elif b+W < a:
        print(abs(a-(b+W)))
a=input()
b=a.split()
c=sorted(b)
print(c[0,1,2])



### FIXED CODE ###

a=input()
b=a.split()
c=list()
for d in b:
    c.append(int(d))
d=sorted(c)
print(d[0],d[1],d[2])