CodeEff/ECCO huggingface dataset:
# Original solution
M,D = list(map(int,input().split()))
ans = 0
for i in range(1, M+1):
  for j in range(1, D+1):
    if j < 22:
      continue
    else:
      j = str(j)
      d1 = int(j[0])
      d2 = int(j[1])
      if d1>=2 and d2>=2 and i == d1*d2:
        ans += 1
print(ans)

# Optimized solution
M,D = list(map(int,input().split()))
ans = 0
for i in range(1, M+1):
  for j in range(1, D+1):
    if j//10 >=2 and j%10 >=2 and i == (j//10)*(j%10):
        ans += 1
print(ans)
# Original solution
# jsc2019-qualA - Takahashi Calendar
# exhaustive search
def main():
    M, D = tuple(map(int, input().split()))
    ans = 0
    for m in range(1, M + 1):
        for d in range(1, D + 1):
            if len(str(d)) != 1:
                d1, d10 = int(str(d)[1]), int(str(d)[0])
                if d1 >= 2 and d10 >= 2:
                    ans += 1 if d1 * d10 == m else 0
    print(ans)


if __name__ == "__main__":
    main()

# Optimized solution
# jsc2019-qualA - Takahashi Calendar
def main():
    M, D = tuple(map(int, input().split()))
    ans = 0
    for d in range(22, D + 1):
        d1, d10 = d % 10, d // 10
        ans += 1 if d1 >= 2 and d1 * d10 <= M else 0
    print(ans)


if __name__ == "__main__":
    main()
# Original solution
#import pysnooper
#import numpy
#import os,re,sys,operator
#from collections import Counter,deque
#from operator import itemgetter,mul
#from itertools import accumulate,combinations,groupby,combinations_with_replacement,permutations
from sys import stdin,setrecursionlimit
#from bisect import bisect_left,bisect_right
#from copy import deepcopy
#import heapq
#import math
#import string
#from time import time
#from functools import lru_cache,reduce
#from math import factorial,hypot
#import sys
#from fractions import gcd
setrecursionlimit(10**6)
input=stdin.readline

m,d=list(map(int,input().split()))
ans=0
for i in range(1,m+1):
    for j in range(1,d+1):
        s=str(j)
        if len(s)>=2:
            o,t=int(s[0]),int(s[1])
            if o>=2 and t>=2 and o*t==i:
                #print(i,j)
                ans+=1
print(ans)

# Optimized solution
m,d=list(map(int,input().split()))
ans=0
for month in range(1,m+1):
    for day in range(1,d+1):
        day=str(day)
        if len(day)!=2:
            continue
        if int(day[0])*int(day[1])!=month:
            continue
        if int(day[0])<2 or int(day[1])<2:
            continue
        #print(month,day)
        ans+=1
print(ans)
# Original solution
M, D = list(map(int, input().split()))

count = 0
for m in range(1, M + 1):
    for d in range(1, D + 1):
        d1 = int(str(d).zfill(2)[1])
        d10 = int(str(d).zfill(2)[0])
        if d1 >= 2 and d10 >= 2 and d1 * d10 == m:
            count += 1
print(count)


# Optimized solution
M, D = list(map(int, input().split()))

count = 0
for m in range(1, M + 1):
    for d in range(1, D + 1):
        d10, d1 = divmod(d, 10)
        if d1 >= 2 and d10 >= 2 and d1 * d10 == m:
            count += 1
print(count)
# Original solution
M,D = list(map(int, input().split()))

D = int(D)
ans = 0

for i in range(1,M+1):
    for j in range(1,D+1):
        j = str(j)
        if len(j) == 2:
            j1 = int(j[0])
            j2 = int(j[1])
            if j1 >= 2 and j2 >= 2 and j1 * j2 == i:
                ans += 1


print(ans)


# Optimized solution
M,D = list(map(int, input().split()))

ans = 0

for i in range(1,M+1):
    for j in range(1,D+1):
        j1 = j // 10
        j2 = j % 10
        if j1 >= 2 and j2 >= 2 and j1 * j2 == i:
            ans += 1


print(ans)
# Original solution
M, D = list(map(int, input().split()))

ans = 0
for m in range(1, M+1):
    for d in range(22, D+1):
        d1 = d % 10
        if d1 < 2: continue
        d10 = d // 10
        if d10 < 2: continue
        if d1 * d10 == m:
            ans += 1

print(ans)


# Optimized solution
M, D = list(map(int, input().split()))

ans = 0
for d in range(22, D+1):
    d1 = d % 10
    if d1 < 2: continue
    d10 = d // 10
    if d10 < 2: continue
    if d1 * d10 <= M:
        ans += 1

print(ans)
# Original solution
tmp = [int(i) for i in input().split()]
M, D = tmp[0], tmp[1]
if D < 22 or M < 4:
  print((0))
else:
  days = [(str(i)[0], str(i)[1]) for i in range(22,  D+1) if int(str(i)[0])>1 and int(str(i)[1])>1]

  n = 0
  for m in range(4, M+1):
      for d in days:
          if m == int(d[0])*int(d[1]):
              n +=1
  print(n)

# Optimized solution
tmp = [int(i) for i in input().split()]
M, D = tmp[0], tmp[1]
if D < 22 or M < 4:
  print((0))
else:
  days = [(str(i)[0], str(i)[1]) for i in range(22,  D+1) if int(str(i)[0])>1 and int(str(i)[1])>1]
  n = 0
  print((sum([1 for m in range(4, M+1) for d in days if m == int(d[0])*int(d[1])])))
# Original solution
M,D = list(map(int,input().split()))
cnt = 0
for i in range(22,D+1):
    d = str(i)
    if int(d[1])>=2 and int(d[1])*int(d[0])<=M:
        cnt += 1
print(cnt)

# Optimized solution
M,D = list(map(int,input().split()))
cnt = 0
for m in range(4,M+1):
    for d in range(1,D+1):
        if d>=20:
            d = str(d)
            if int(d[1])>=2:
                if m==int(d[0])*int(d[1]):
                    cnt += 1
print(cnt)
# Original solution
M, D = list(map(int, input().split()))

ans = 0
for i in range(1, M+1):
    for j in range(1, D+1):
        if len(str(j)) == 1:
            continue
        # 日付が二桁以上であることが確定
        d1 = int(str(j)[0])
        d2 = int(str(j)[1])
        if d1 >= 2 and d2 >= 2:
            if i == (d1*d2):
                ans += 1

print(ans)


# Optimized solution
M, D = list(map(int, input().split()))

ans = 0
for i in range(1, M+1):  # 月
    for j in range(10, D+1):  # 日付
        d1 = int(str(j)[0])
        d2 = int(str(j)[1])

        if d1 > 1 and d2 > 1:
            if i == (d1 * d2):
                ans += 1

print(ans)
# Original solution
M, D = list(map(int, input().split()))

ans = 0
for m in range(1, M+1):
    for d in range(20, D + 1):
        a, b = list(map(int, str(d)))
        if b < 2:
            continue
        elif m == a*b:
            ans += 1


print(ans)


# Optimized solution
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)

M, D = list(map(int, input().split()))

ans = 0

for d in range(20, D + 1):
    for m in range(1, M+1):
        a, b = d//10, d % 10
        if m == a*b and b >= 2:
            ans += 1


print(ans)
# Original solution
M,D=list(map(int, input().split()))

seki=0
for m in range(1,M+1):
    for d in range(1,D+1):
        str_d = str(d)
        if len(str_d)==2:
            d10 = int(str_d[0])
            d1  = int(str_d[1])
            if d10 >= 2 and d1 >= 2 and d10*d1 == m:
                seki+=1
print(seki)

# Optimized solution
M, D = list(map(int, input().split()))
seki = 0
for m in range(1, M + 1):
    for d in range(1, D + 1):
        d10, d1 = divmod(d, 10)
        if d10 >= 2 and d1 >= 2 and d10 * d1 == m:
            seki += 1
print(seki)
# Original solution
n = int(eval(input()))
d = [int(eval(input())) for i in range(n)]
pos = 0
ans = "yes"
for i in range(n):
      if pos>=i*10:
            pos = max(pos,i*10+d[i])
      else:
            ans = "no"
            break
      if pos >= (n-1)*10:
            break
pos = 0
for i in range(n):
      if pos>=i*10:
            pos = max(pos,i*10+d[n-1-i])
      else:
            ans = "no"
            break
      if pos >= (n-1)*10:
            break
print(ans)


# Optimized solution
n = int(eval(input()))
a = [int(eval(input())) for i in range(n)]

ok = True
rg = list(range(n))
l = 0
for i,d in zip(rg,a):
    if i*10 > l:
        ok = False
        break
    if l >= (n-1)*10:
        break
    if i*10+d > l:
        l = i*10+d

a.reverse()
l = 0
for i,d in zip(rg,a):
    if i*10 > l:
        ok = False
        break
    if l >= (n-1)*10:
        break
    if i*10+d > l:
        l = i*10+d

if ok:
    print('yes')
else:
    print('no')
# Original solution

import collections


def solve():
    R = int(eval(input()))

    if R < 1200:
        print("ABC")
    elif R < 2800:
        print("ARC")
    else:
        print("AGC")


if __name__ == "__main__":
    solve()


# Optimized solution
R = int(eval(input()))
if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")
# Original solution
a = int(eval(input()))
print(("ABC" if a<1200 else "ARC" if a<2800 else "AGC"))

# Optimized solution
C = ["ABC", "ARC" , "AGC"]
A = int(eval(input()))
print((C[(A>1199)+(A>2799)]))
# Original solution
r=int(eval(input()))
print(("ABC" if r<1200 else "ARC" if r<2800 else "AGC"))

# Optimized solution
print((["ABC","ARC","AGC"][(int(eval(input()))+400)//1600]))
# Original solution
r=int(eval(input()))
data1=1200
dara2=2800
name=('ABC', 'ARC', 'AGC')
if r<data1:
  print((name[0]))
elif data1<=r<2800:
  print((name[1]))
else:
  print((name[2]))
  



# Optimized solution
r=int(eval(input()))
data1=1200
data2=2800
name=('ABC', 'ARC', 'AGC')
if r<data1:
  print((name[0]))
elif data1<=r<data2:
  print((name[1]))
else:
  print((name[2]))
# Original solution
r=int(eval(input()))
data1=1200
data2=2800
name=('ABC', 'ARC', 'AGC')
if r<data1:
  print((name[0]))
elif data1<=r<data2:
  print((name[1]))
else:
  print((name[2]))

# Optimized solution
r=int(eval(input()))
data=(1200,2800)
name=('ABC', 'ARC', 'AGC')
if r<data[0]:
  print((name[0]))
elif data[0]<=r<data[1]:
  print((name[1]))
else:
  print((name[2]))
# Original solution
r=int(input())
data=(1200,2800)
name=('ABC', 'ARC', 'AGC')

[print(name[0]) for i in range(1) if r < 1200]
[print(name[1]) for i in range(1) if 1200 <= r < 2800 ]
[print(name[2]) for i in range(1) if 2800 <=r ]



# Optimized solution
r=int(eval(input()))
data=(1200,2800)
name=('ABC', 'ARC', 'AGC')

z=[name[0] if r < 1200 else name[1] if 1200 <= r < 2800 else name[2] if 2800 <= r else i for i in range(1)]
print((z[0]))
# Original solution
R = int(eval(input()))
if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

# Optimized solution
R = int(eval(input()))
print(("ABC" if R <1200 else "ARC" if R < 2800 else "AGC"))
# Original solution
R = int(eval(input()))

if R < 1200:
    print('ABC')
elif 1200 <= R < 2800:
    print('ARC')
else:
    print('AGC')

# Optimized solution
R = int(eval(input()))
print(('ABC' if R < 1200 else 'ARC' if 1200 <= R < 2800 else 'AGC'))
# Original solution
R = int(eval(input()))

if R<1200:
  print("ABC")
elif R<2800:
  print("ARC")
else:
  print("AGC")

# Optimized solution
print(("A"+"BRG"[(int(eval(input()))+400)//1600]+"C"))
# Original solution
import sys
ri = lambda: int(sys.stdin.readline())
a = ri()
if a < 1200:
  print('ABC')
elif a < 2800:
  print('ARC')
else:
  print('AGC')

# Optimized solution
import sys
ri = lambda: int(sys.stdin.readline())

a = ri()
if a < 1200:
  print('ABC')
else:
  print(('ARC' if a < 2800 else 'AGC'))
# Original solution
print(("A"+"BRG"[(int(eval(input()))+400)//1600]+"C"))


# Optimized solution
print(("A"+"BRG"[int(eval(input()))//50+8>>5]+"C"))
# Original solution
rating = int(eval(input()))

if rating < 1200:
    print('ABC')
elif 1200 <= rating < 2800:
    print('ARC')
elif rating >= 2800:
    print('AGC')


# Optimized solution
r = int(eval(input()))

if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')
# Original solution
# -*- coding: utf-8 -*-
R = int(eval(input()))
if R >=2800:
  print("AGC")
elif R >= 1200 and 2800 > R:
  print("ARC")
else:
  print("ABC")

# Optimized solution
R = int(eval(input()))
if R < 1200:
    ans = "ABC"
elif R <2800:
    ans = "ARC"
else:
    ans = "AGC"

print(ans)
# Original solution
n, s = list(map(int, input().split()))
a = list(map(int, input().split()))

ans = None
for window in range(0, n):
    sum_a = None
    for i in range(n-window):
        if sum_a == None:
            sum_a = sum(a[i:window+1])
        else:
            sum_a += a[i+window] - a[i-1]
        if sum_a >= s:
            ans = window+1
            break
    if ans != None: break

if ans == None: ans = 0
print(ans)


# Optimized solution
n, s = list(map(int, input().split()))
a = list(map(int, input().split()))

ans = None
init_tmp = 0
for window in range(n):
    init_tmp += a[window]
    sum_a = init_tmp
    for i in range(n-window):
        if i != 0:
            sum_a += a[i+window] - a[i-1]
        if sum_a >= s:
            ans = window+1
            break
    if ans != None: break

if ans == None: ans = 0
print(ans)
# Original solution
n = int(eval(input()))
t, a = list(map(int, input().split()))
h = list(map(int, input().split()))
m = 10**19
idx = 0
for i in range(n):
    d = t - h[i]*0.006
    if abs(a-d) < m:
        m = abs(a-d)
        idx = i+1
print(idx)


# Optimized solution
n = int(eval(input()))
t, a = list(map(int, input().split()))
h = list(map(int, input().split()))
m = 10**19
# 地点の番号(=1)
idx = 0
for i in range(n):
    # 平均気温
    d = t - h[i]*0.006
    # A度に最も近い地点
    if abs(a-d) < m:
        m = abs(a-d)
        idx = i+1
print(idx)
# Original solution
n = int(eval(input()))
t, a = list(map(int, input().split()))
diff_list = [abs(t-h_i*0.006-a) for h_i in map(int, input().split())]
print((diff_list.index(min(diff_list))+1))

# Optimized solution
n = int(eval(input()))
t,a = list(map(int, input().split()))

tmp_diff_list = [abs(t-i*0.006-a) for i in list(map(int, input().split()))]

print((tmp_diff_list.index(min(tmp_diff_list))+1))
# Original solution
N = int(eval(input()))
T,A = list(map(int,input().split()))
H = list(map(int,input().split()))
num = abs(A - T + H[0]*0.006)
ans = 1
for i in range(1,N):
    if num > abs(A-T+H[i]*0.006):
        num = abs(A-T+H[i]*0.006)
        ans = i+1
print(ans)

# Optimized solution
N = int(eval(input()))
T,A = list(map(int,input().split()))
H = list(map(int,input().split()))
a_list = []
for i in range(N):
    a_list.append(abs(A-(T-H[i]*0.006)))
print((a_list.index(min(a_list))+1))
# Original solution
# 入力
N = int(eval(input()))
[T,A] = list(map(int, input().split()))
H = list(map(int, input().split()))

# 処理
ans_idx = -1  # 答えとなる地点のインデックス
ans_t   = -1  # 答えとなる地点の気温
for i in range(N):
  t = T - H[i]*0.006  # i番目の地点の気温
  if ans_idx < 0 or abs(t-A) < abs(ans_t-A):
    ans_idx = i
    ans_t = t

# 答え
print((ans_idx+1))

# Optimized solution
def calc_temp(i):
  return T - 0.006*H[i]

N = int(eval(input()))
[T,A] = list(map(int,input().split()))
H = list(map(int,input().split()))
ans = 0
for i in range(N):
  if abs(A-calc_temp(i)) < abs(A-calc_temp(ans)):
    ans = i
print((ans+1))
# Original solution
n = int(eval(input()))
t,a = list(map(int,input().split()))
h = list(map(int,input().split()))
ans = 1
min_dif = abs(t-h[0]*0.006-a)
for i in range(1,n):
    dif = abs(t-h[i]*0.006-a)
    if min_dif > dif: min_dif,ans = dif,i+1
print(ans)

# Optimized solution
n = int(eval(input()))
t,a = list(map(int,input().split()))
h = list(map(int,input().split()))
dif = 10**10
ans = 0
for i in range(n):
    z = t-h[i]*0.006
    if dif>abs(a-z):
        dif = abs(a-z)
        ans = i+1
print(ans)
# Original solution
import sys
n = int(eval(input()))
t,a = list(map(int,input().split()))
h = list(map(int,input().split()))
c = t - h[0] * 0.006
k = 1
for i in range(n):
    if abs(a-c) > abs(a-(t - h[i] * 0.006)):
        c = t - h[i] * 0.006
        k = i + 1
print(k)

# Optimized solution
n = int(eval(input()))
t,a = list(map(int,input().split()))
h = list(map(int,input().split()))
mi = 1000000000
for i in range(n):
    if mi > abs(a-(t-h[i]*0.006)):
        mi = abs(a-(t-h[i]*0.006))
        ans = i+1
print(ans)
# Original solution
N = int(eval(input()))
T, A = list(map(int,input().split()))
H = list(map(int,input().split()))
for i in range(N):
    H[i] = T - H[i]*0.006
h = 100000
a = 0
for i in range(N):
    if abs(H[i]-A) < h:
        h = abs(H[i]-A)
        a = i+1
print(a)

# Optimized solution
N = int(eval(input()))
T, A = list(map(int, input().split()))
H = list(map(int, input().split()))
bestH = (T - A) / 0.006
d = float('inf')
ans = 0
for i in range(N):
    if d > abs(H[i] - bestH):
        d = abs(H[i] - bestH)
        ans = i + 1
print(ans)
# Original solution

n = int(eval(input()))
t, a = [int(x) for x in input().split()]
locations =[int(x) for x in input().split()]
print((min([(i+1,abs(a - (t - x * 6e-3))) for i, x in enumerate(locations)],key=(lambda j:j[1]))[0]))


# Optimized solution

n = int(eval(input()))
t, a = [int(x) for x in input().split()]
locations =[int(x) for x in input().split()]
# print(min([(i+1,abs(a - (t - x * 6e-3))) for i, x in enumerate(locations)],key=(lambda j:j[1]))[0])
diff = [abs(a - (t - x * 6e-3)) for x in locations]
print((diff.index(min(diff))+1))
# Original solution
n = int(eval(input()))
t, a = list(map(int, input().split()))
h = list(map(int, input().split()))
H = [abs(t-a-x * 6e-3) for x in h]
print((1 + H.index(min(H))))

# Optimized solution
n = int(eval(input()))
t, a = list(map(int, input().split()))
lst = [ abs((t - i * 0.006)-a) for i in list(map(int, input().split()))]
print((lst.index(min(lst)) + 1))
# Original solution
N = int(eval(input()))
T, A = list(map(int, input().split()))
Hn = list(map(int, input().split()))

An = [T - 0.006*i for i in Hn]

tp = [10000000]*(N+1)
tpa = N
for i in range(N):
  tp[i] = abs(A - An[i])
  tpa = i if tp[i] < tp[tpa] else tpa

print((tpa+1))

# Optimized solution
N = int(eval(input()))
T, A = list(map(int, input().split()))
Hn = list(map(int, input().split()))

An = [abs(A - (T - 0.006*i)) for i in Hn]
print((An.index(min(An))+1))
# Original solution
# coding: utf-8

pointCount = int(eval(input()))
(t, a) = [int(i) for i in input().rstrip().split(" ")]

point_lit = [int(i) for i in input().rstrip().split(" ")]


min_diff = 100000
ans = 0
for i in range(len(point_lit)):
    kion = t - (point_lit[i] * 0.006)
    diff = abs(a - kion)
    if diff < min_diff:
        min_diff = diff
        ans = i + 1

print(ans)

# Optimized solution
# coding: utf-8

n = int(eval(input()))
(t, a) = [int(i) for i in input().rstrip().split(" ")]

point_list = [int(i) for i in input().rstrip().split(" ")]

ans = -1
nearest = 100000

for i in range(n):
    kion = abs(t - (point_list[i] * 0.006) - a)
    if kion < nearest:
        ans = i + 1
        nearest = kion

print(ans)
# Original solution
import sys
input = sys.stdin.buffer.readline

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

Th = [T - h * 0.006 for h in H]

answer = -1
dif = 10 ** 15
for i, t in enumerate(Th, 1):
    if abs(A - t) < dif:
        answer = i
        dif = abs(A - t)

print(answer)

# Optimized solution
import sys
input = sys.stdin.buffer.readline

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

answer = -1
dif = 10 ** 15
for i, h in enumerate(H, 1):
    if abs(A - (T - h * 0.006)) < dif:
        answer = i
        dif = abs(A - (T - h * 0.006))

print(answer)
# Original solution
n=int(eval(input()))
t,a=[int(i) for i in input().split()]
h_list=[int(i) for i in input().split()]


a_list=[abs(a-(t-i*0.006)) for i in h_list]

print((a_list.index(min(a_list))+1))

# Optimized solution
n=int(eval(input()))
t,a=[int(i) for i in input().split()]

h_list=[int(i) for i in input().split()]

#絶対値のリスト
abs_list=[]
for i in range(n):
    abs_list.append(abs(a-(t-h_list[i]*0.006)))
    
print((abs_list.index(min(abs_list))+1))
# Original solution
N=int(eval(input()))
T,A=list(map(int,input().split()))
H=list(map(int,input().split()))
P=float("inf")
X=B=0
for i in range(N) :
  X=abs(A-(T-H[i]*0.006))
  if X<P :
    B=i
    P=X
print((B+1))

# Optimized solution
N=int(eval(input()))
T,A=list(map(int,input().split()))
L=[]
for i in map(int,input().split()) :
  B=abs(A-(T-i*0.006))
  L.append(B)
print((L.index(min(L))+1))
# Original solution
N = int(eval(input()))
T, A = list(map(int, input().split()))

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

mn = None
for i, h in enumerate(H):
    d = abs(A - (T - h * 0.006))
    mn = (i, d) if mn is None or mn[1] > d else mn
print((mn[0] + 1))

# Optimized solution
N = int(eval(input()))
T, A = list(map(int, input().split()))
H = list(map(int, input().split()))

mn = None
for i in range(N):
    x = abs(A - (T - H[i] * 0.006))
    if mn is None or x < mn[1]:
        mn = (i, x)
print((mn[0] + 1))
# Original solution
N = int(eval(input()))
T, A = list(map(int, input().split()))
H = list(map(int, input().split()))
AveT = []
diff = []

for i in range(N):
	AveT.append(T - H[i]*0.006)
	diff.append(abs(AveT[i] - A))

for i in range(N):
	if diff[i] == min(diff):
		place = i + 1

print(place)

# Optimized solution
N = int(eval(input()))
T, A = list(map(int, input().split()))
H = list(map(int, input().split()))
AveT = [T - h*0.006 for h in H]
diff = [abs(Ave_t - A) for Ave_t in AveT]

print((diff.index(min(diff)) + 1))
# Original solution
#n = 候補の数
n = int(eval(input()))
#t - h[i] * 0.006
#a = 基準温度
t,a = list(map(int,input().split()))
h = list(map(int,input().split()))
#o = 計算結果格納
o = []

for i in range(n):
    o.append(t - h[i] * 0.006)

#p = 基準温度に最も近い場所の差
p = abs(a - o[0])
#q = 基準地点の番号
q = 0
for i in range(n)[1:]:
    if abs(a - o[i]) < p:
        p = abs(a - o[i])
        q = i

print((q + 1))

# Optimized solution
n = int(eval(input()))
t,a = list(map(int,input().split()))
h = list(map(int,input().split()))
p = 10 ** 8
ans = 0
for i in range(n):
    x = t - h[i] * 0.006
    x = abs(a - x)
    if p > x:
        p = x
        ans = i + 1
print(ans)
# Original solution
N = int(eval(input()))
T, A = list(map(int, input().split()))
H = list(map(int, input().split()))

for i in range(N):
  H[i] = abs(T - H[i]*0.006 - A)
  

print((H.index(min(H))+1))

# Optimized solution
N = int(eval(input()))
T, A  = list(map(int, input().split()))
H = list(map(int, input().split()))

MIN = 10000
ans = 10000

for i in range(N):
  if MIN > abs((T - H[i]*0.006) - A):
    MIN = abs((T - H[i]*0.006) - A)
    ans = i

print((ans+1))
# Original solution
import sys

input = sys.stdin.readline

def main():
    ans = 0
    N = int(eval(input()))
    T, A = list(map(int, input().split()))
    h = list(map(int, input().split()))
    temp = float('inf')
    for  i in range(N):
        d = T - h[i]*0.006
        if abs(A - temp) > abs(A - d):
            temp = d
            ans = i+1
    print(ans)

if __name__ == '__main__':
    main()

# Optimized solution
import sys

input = sys.stdin.readline

def main():
    l = []
    N = int(eval(input()))
    T, A = list(map(int, input().split()))
    h = list(map(int, input().split()))
    for  i in range(N):
      l.append(abs(A-(T-h[i]*0.006)))
    print((l.index(min(l))+1))

if __name__ == '__main__':
    main()
# Original solution
n = int(eval(input()))
t, a = list(map(int, input().split()))
listh = list(map(int, input().split()))
temp = 100000
index = 0

for i in range(n):
    diff = abs((t - listh[i] * 0.006)-a)
    if temp > diff:
        temp = diff
        index = i+1

print(index)


# Optimized solution
n = int(eval(input()))
t, a = list(map(int, input().split()))
listh = list(map(int, input().split()))
diff = [abs((t-x*0.006)-a) for x in listh]
print((diff.index(min(diff))+1))
# Original solution
N=int(eval(input()))
T,A=list(map(int,input().split()))
H=list(map(int,input().split()))
num=0
for i in range(N):
    if i==0:
        num=(T-H[0]*0.006)
        spot=0
    else:
        if abs(A-(T-H[i]*0.006))<=abs(A-num):
            num=(T-H[i]*0.006)
            spot=i

print((spot+1))


# Optimized solution
N=int(eval(input()))
T,A=list(map(int,input().split()))
H=list(map(int,input().split()))
ans=[]
for i in H:
    ans.append(abs(A-(T-i*0.006)))
print((ans.index(min(ans))+1))
# Original solution
N=int(eval(input()))
T,A=list(map(int,input().split()))
H=list(map(int,input().split()))
m=100100100100
for i in range(N):
  if abs(A-T+H[i]*0.006)<m:
    m=abs(A-T+H[i]*0.006)
    ans=i
print((ans+1))

# Optimized solution
N=int(eval(input()))
T,A=list(map(int,input().split()))
H=list(map(int,input().split()))
z=[abs(A-T+i*0.006) for i in H]
print((z.index(min(z))+1))
# Original solution
n = int(eval(input()))
t,a = list(map(int,input().split()))
l = []
m = []
ans = []

l = list(map(int,input().split()))
    
for i in range(n):
    m.append(t - (l[i] * 0.006))

for i in range(n):
    ans.append(a - m[i])

print((ans.index(min(ans,key=abs))+1))

# Optimized solution
n = int(eval(input()))
t,a = list(map(int,input().split()))
ans = []

l = list(map(int,input().split()))
    
for i in l:
    ans.append(abs(a - (t - (i * 0.006))))

print((ans.index(min(ans))+1))