Harryxun/stf_run huggingface dataset:
N = int(input())
list = [0]*1001
for i in range(1,int(N**0.5)):  
    for j in range(1,int(N**0.5)):
        a = i*i + j*j + i*j
        for k in range(1,int(N**0.5)):
            a = i*i + j*j + k*k + i*j +j*k + i*k
            if a <= N:
                list[a] += 1
for i in list[1:]:
    print(i)

### FIXED CODE ###

N = int(input())
list = [0]*(N+1)
for i in range(1,100):  
    for j in range(1,100):
        a = i*i + j*j + i*j
        for k in range(1,100):
            a = i*i + j*j + k*k + i*j +j*k + i*k
            if a <= N:
                list[a] += 1
for i in range(1,N+1):
    print(list[i])
n=int(input())
dat = list(map(int, input().split()))

for e in dat:
    e = str(bin(e))

for e in dat:
    e = e [::-1]

#print(min(dat)-1)



### FIXED CODE ###

import sys

def main():
    N = int(input())
    A = [int(_) for _ in input().split()]

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()
a = int(input())
s = input()
if a<3200:
  print('red',flush=true)
else:
  print(s,flush=true)

### FIXED CODE ###

a = int(input())
s = input()
if a<3200:
  print('red')
else:
  print(s)
print(3*input()**2)

### FIXED CODE ###

print(3*int(input())**2)
n = int(input())
d = list(map(int, input().split()))

d_sum = sum(d)

m = 0
for k in d:
    m += k **2
    
print((d_sum**2 - m)　//　2)

### FIXED CODE ###

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

d_sum = sum(d)

m = 0
for k in d:
    m += k **2
    
print((d_sum**2 - m)//2)
from sys import stdin
def main():
  N, M = map(int, stdin.readline().rstrip().split())
  paterList=[]
  Abefore=0

  a1=1
  a2=2
  for i in range(M):
    A = int(input())
    stepNum=A-Abefore
    
    if stepNum == 1:
      print("0")
      return
    elif stepNum <= 3:
      paterList.append(stepNum-1)
    else:
      an2=a1
      an1=a2
      for j in range(stepNum -1-2):
        patern += an2+an1
        an2 = an1
        an1 = patter
      paterList.append(patern//1000000007 )
  print(sum(paterList)//1000000007)
      
input = lambda: stdin.readline()
main()


### FIXED CODE ###

from sys import stdin

def main():
  N, M = map(int, stdin.readline().rstrip().split())
  beforeA=-1
  Mlist=[]

  for i in range(M):
    a = int(stdin.readline().rstrip())
    if (a-beforeA)==1:
      print("0")
      exit()
    Mlist.append(a)
    beforeA = a
      
  if N == 1 or (N == 2 and M==1):
    print("1")
    exit()
  if N == 2:
    print("2")
    exit()

  Mindex=0
  broken=-2
  if len(Mlist) >0:
    broken = Mlist[Mindex]
  an2=0
  an1=1
  patern=1
  brokenNext=False
  for i in range(1,N+1):
    if broken == i:
      Mindex+=1
      if len(Mlist) > Mindex:
        broken = Mlist[Mindex]
      brokenNext=True
      continue
    if brokenNext:
      brokenNext=False
      an2=0
      continue
    patern=(an1+an2)%1000000007
    an2=an1
    an1=patern
    #print("{}: {}".format(i,patern))
  print(patern%1000000007 )

main()
from sys import stdin
import math
import fractions
from collections import deque
import collections
import itertools

INF = 10 ** 10


# N個のボールがあり、i番目のボールは(xi, yi)にある
N = int(stdin.readline().rstrip())
xy = [list(map(int, stdin.readline().rstrip().split())) for _ in range(N)]

data = []

for i in range(N):
    for j in range(i+1, N):
        x_diff = abs(xy[i][0] - xy[j][0])
        y_diff = abs(xy[i][1] - xy[j][1])

        data.append("{0},{1}".format(x_diff, y_diff))

c = collections.Counter(data)

print(N - c.most_common()[0][1])


### FIXED CODE ###

from sys import stdin
import math
import fractions
from collections import deque
import collections
import itertools

INF = 10 ** 10


# N個のボールがあり、i番目のボールは(xi, yi)にある
N = int(stdin.readline().rstrip())
xy = [list(map(int, stdin.readline().rstrip().split())) for _ in range(N)]

data = []

if N == 1:
    print(1)
    exit()

for i in range(N):
    for j in range(i+1, N):
        x_diff = xy[i][0] - xy[j][0]
        y_diff = xy[i][1] - xy[j][1]
        data.append("{0},{1}".format(x_diff, y_diff))
        data.append("{0},{1}".format(-x_diff, -y_diff))

c = collections.Counter(data)

print(N - c.most_common()[0][1])
ba, bb = (int(x) for x in int(input().split()))
m = a if a > b else b
for i in range(m+2):
    a = abs(a-i)
    b = abs(b-i)
    if a == b:
        print(i)
if i == m+1:
    print('IMPOSSIBLE')

### FIXED CODE ###

a, b = (int(x) for x in input().split())
ans = int(a/2+b/2+0.5)
if abs(a-ans) == abs(b-ans):
    print(ans)
else:
    print("IMPOSSIBLE")
N=int(input())
A = list(map(int, input().split()))
i = 0
sum = 0
while i<N:
  if A[i]<=A[i+1]:
    f=0
  else:
    f=A[i]-A[i+1]
  A[i+1]+=f
  sum+=f
  i+=1
print(sum)

### FIXED CODE ###

N=int(input())
A = list(map(int, input().split()))
i = 0
sum = 0
while i<N-1:
  if A[i]<=A[i+1]:
    f=0
  else:
    f=A[i]-A[i+1]
  A[i+1]+=f
  sum+=f
  i+=1
print(sum)
X = int(input())
if x >= 30:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

X = int(input())
if X >= 30:
  print("Yes")
else:
  print("No")
#!/usr/bin/env python3
import statistics.median()

n = int(input())

a = []
b = []
for _ in range(n):
    a, b = list(map(int, input().split()))
    a.append(a)
    b.append(b)

a_median = statistics.median(a)
b_median = statistics.median(b)

if n % 2 == 0:
    print(b_median-a_median+1)
else:
    print(b_median*2-a_median*2+1)



### FIXED CODE ###

#!/usr/bin/env python3
import statistics

n = int(input())

a_list = []
b_list = []
for _ in range(n):
    a, b = list(map(int, input().split()))
    a_list.append(a)
    b_list.append(b)

a_median = statistics.median(a_list)
b_median = statistics.median(b_list)

# print(a_median)
# print(b_median)
if n % 2 != 0:
    print(int(b_median-a_median+1))
else:
    print(int(b_median*2-a_median*2+1))
import math
n=int(input())

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

### FIXED CODE ###

n=int(input())

if n%2==0:
    print(n)
else:
    print(n*2)
#-*- coding:utf-8 -*-

#入力数値を分単位に変更
def convert_time(n):
    return (n/100)*60 + n%100

#コマーシャルの共通部分を返す
def kyotsu(cm1,cm2):
    result = []
    for i in range(len(cm2)/2):
        #cm2の各CMとかぶっている部分を取得
        for j in range(len(cm1)/2):
            st = max(cm2[i*2],cm1[j*2])
            ed = min(cm2[i*2+1],cm1[j*2+1])
            if ed - st > 0:
                result.append(st)
                result.append(ed)

    return result

#コマーシャルを見ずにテレビを見られる最長時間を求める
while 1:
    cond = [int(r) for r in raw_input().split(" ")]
    if cond[0]==cond[1]==cond[2]==0: #入力がすべて0なら終了
        break

    #開始時間、終了時間を算出
    start = convert_time(cond[1])
    end = convert_time(cond[2])

    cms = []
    #各チャンネルのコマーシャル時間を求める
    for i in range(cond[0]):
        n = int(raw_input()) #コマーシャル数
        input = [convert_time(int(r)) for r in raw_input().split(" ")]
        j=0
        cmstmp = []
        while j < n:
            st = input[2*j]
            ed = input[2*j+1]
            if i==0:
                cms.append(st)
                cms.append(ed)
            else:
                cmstmp.append(st)
                cmstmp.append(ed)
            j += 1
        if i>0:
            cms = kyotsu(cms,cmstmp)


    #cmsを利用してコマーシャルを見なくてすむ最大時間を出力
    cms = [start] + cms + [end]
    print max([cms[i*2+1]-cms[i*2] for i in range(len(cms)/2)])

### FIXED CODE ###

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

#入力数値を分単位に変更
def convert_time(n):
    return (n/100)*60 + n%100

#コマーシャルの共通部分を返す
def kyotsu(cm1,cm2):
    result = []
    for i in range(len(cm2)/2):
        #cm2の各CMとかぶっている部分を取得
        for j in range(len(cm1)/2):
            stt = max(cm2[i*2],cm1[j*2])
            edt = min(cm2[i*2+1],cm1[j*2+1])
            if edt - stt > 0:
                result.append(stt)
                result.append(edt)

    return result

#コマーシャルを見ずにテレビを見られる最長時間を求める
while 1:
    cond = [int(r) for r in raw_input().split()]
    if cond[0]==cond[1]==cond[2]==0: #入力がすべて0なら終了
        break

    #開始時間、終了時間を算出
    start = convert_time(cond[1])
    end = convert_time(cond[2])

    cms = []
    #各チャンネルのコマーシャル時間を求める
    for i in range(cond[0]):
        n = int(raw_input()) #コマーシャル数
        input = [convert_time(int(r)) for r in raw_input().split()]
        j=0
        cmstmp = []
        while j < n:
            st = input[2*j]
            ed = input[2*j+1]
            if not i:
                cms.append(st)
                cms.append(ed)
            else:
                cmstmp.append(st)
                cmstmp.append(ed)
            j += 1
        if i > 0:
            cms = kyotsu(cms,cmstmp)


    #cmsを利用してコマーシャルを見なくてすむ最大時間を出力
    cms = [start] + cms + [end]
    print max([cms[i*2+1]-cms[i*2] for i in range(len(cms)/2)])
n,k = map(int, input().split())
a = list(map(int, input().split()))

l = [-1]*n
t = 0
s = 1
while l[s-1] == -1:
  if t == k: break
  l[s-1] = t
  t += 1
  s = a[s-1]
else:
  p = (k - l[s-1]) % (t - l[s-1])
  ans = l.index(l[s-1] + p) + 1
print(ans)

### FIXED CODE ###

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

zero = [-1]*N

t = 0 # テレポート回数をカウント
a = 1
while zero[a-1] == -1: # テレポートがループした場合に処理を抜ける
  if t == K: # テレポート上限回数に達した場合は処理を抜ける
    break
  zero[a-1] = t # 何番目にレポートしたかを記録
  t += 1
  a = A[a-1] # テレポート先を設定
else:
  k = (K-zero[a-1]) % (t - zero[a-1]) # テレポートの剰余を求める
  a = zero.index(zero[a-1] + k) + 1 # 
print(a)
mod=1000000007
n,m=map(int,input().split())
a=[]
for i in range(m):
    a.append(int(input()))
f=0
for i in range(len(a)):
    if a[i]+1 in a:
        f=1
        break
if f==1:
    print(0)
else:
    dp=[0]*(n+1)
    dp[0]=1
    if 1 in a:
        dp[1]=0
    else:
        dp[1]=1
    
    for i in range(2,n+1):
        if i in a:
            dp[i]=0
        else:
            dp[i]=(dp[i-1]+dp[i-2])%mod
    print(dp[n]%mod)
  

### FIXED CODE ###

import sys
input = sys.stdin.readline

mod=1000000007
n,m=map(int,input().split())
a=[]
for i in range(m):
    a.append(int(input()))
al=len(a)


f=0
for i in range(al-1):
    if a[i+1]==a[i]+1:
        f=1
        break
if f==1:
    print(0)
else:
    dp=[0]*(n+1)
    dp[0]=1
    if 1 in a:
        dp[1]=0
        a.pop(0)
        al-=1
    else:
        dp[1]=1
    
    for i in range(2,n+1):
        if al>0 and i==a[0]:
            dp[i]=0
            a.pop(0)
            al-=1
        else:
            dp[i]=(dp[i-1]+dp[i-2])%mod
    print(dp[n]%mod)
n,m = (int(x) for x in input().split())
friendlist = [0]*n
classes = 1
for i in range(m):
    a,b = (int(x)-1 for x in input().split())
    if friendlist[a]!=0:
        friendlist[b] = friendlist[a]
    elif friendlist[b]!=0:
        friendlist[a] = friendlist[b]
    else:
        friendlist[a] = classes
        friendlist[b] = classes
        classes += 1

count = [0]*classes
for i in range(n):
    count[friendlist[i]] += 1

print(count)
print(max(count[1:]))


### FIXED CODE ###

import os

n,m = (int(x) for x in input().split())

#Union Find

#xの根を求める
def find(x):
    if par[x] < 0:
        return x
    else:
        par[x] = find(par[x])
        return par[x]
#xとyの属する集合の併合
def unite(x,y):
    x = find(x)
    y = find(y)

    if x == y:
        return False
    else:
        #sizeの大きいほうがx
        if par[x] > par[y]:
            x,y = y,x
        par[x] += par[y]
        par[y] = x
        return True

#xとyが同じ集合に属するかの判定
def same(x,y):
    return find(x) == find(y)

#xが属する集合の個数
def size(x):
    return -par[find(x)]

#初期化
#根なら-size,子なら親の頂点
par = [-1]*n

for i in range(m):
    a,b = (int(x)-1 for x in input().split())
    unite(a,b)

ans = 0
for i in range(0,n):
    ans = max([ans,size(i)])

print(ans)
import sys
sys.setrecursionlimit(10 ** 9)

stdin = sys.stdin
 
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

N = ri()
A = rl()
color = [0] * 3
answer = 1
MOD = 10 ** 9 + 7

for a in A:
    answer = answer * color.count(a) % MOD
    i = color.index(a)
    color[i] += 1
    if answer == 0:
        break

print(answer)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 7)

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

color = [0] * 3 # 赤色・青色・緑色の帽子を被っている人数
answer = 1 
MOD = 10 ** 9 + 7

for a in A:
    if color.count(a) == 0:
        print(0)
        exit()
    answer *= color.count(a)
    # aと同じ人数が複数ある場合は一番左の色としてカウント
    i = color.index(a)
    color[i] += 1
    answer %= MOD

print(answer)
s=input()
for i in len(s):
    s[i]="x"
print(s)

### FIXED CODE ###

s=len(input())
print("x"*s)
7 4 2
3

### FIXED CODE ###

a, b, c = map(int, input().split())
k = int(input())
 
n = 0
while b <= a:
  b = b*2
  n += 1
while c <= b:
  c = c*2
  n += 1
if n <= k:
  print("Yes")
else:
  print("No")
import math
n, a, b = map(int,input().split())
score = 1
total = 0
if n % 2 == 1:
  for i in range(1,n//2+1):
    score = score * (n-i+1) // i
  if i != a and i != b and i != n-a and i != n-b:
    total += 2 * score
  else:
    total += score
else:
  for i in range(1,n//2):
    score = score * (n-i+1) // i
  if i != a and i != b and i != n-a and i != n-b:
    total += 2 * score
  else:
    total += score
  k = n//2 
  if k != a and k != b and k != n-a and K != n-b:
    total += score * (n-k+1) // k
print(total % (10**9 + 7))


### FIXED CODE ###

N, a, b = map(int,input().split())
p = pow(10,9) + 7
def comb(n,r):
  bunshi = 1
  for i in range(n-r+1, n+1):
    bunshi =bunshi * i % p
  bunbo = 1
  for i in range(1, r+1):
    bunbo = bunbo * i % p
  return bunshi * pow(bunbo, p-2, p)
print((pow(2,N, p) - 1 - comb(N,a) - comb(N,b)) % p)
import sys
sys.setrecursionlimit(10**6)

debug_mode = True if len(sys.argv) > 1 and sys.argv[1] == "-d" else False
if debug_mode:
    import os
    infile = open(os.path.basename(__file__).replace(".py", ".in"))

    def input():
        return infile.readline()


# ==============================================================


def main():
    a, b, c = list(map(int, input().strip().split()))
    s = sum(a, b, c)
    x = min(a, b, c)
    steps = 0
    while True:
        if s + steps * 2 == 3 * x:
            break
        elif s + steps * 2 < 3 * x:
            steps += 1
        elif s + steps * 2 > 3 * x:
            x += 1
    print(steps)


main()

# ==============================================================

if debug_mode:
    infile.close()


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

debug_mode = True if len(sys.argv) > 1 and sys.argv[1] == "-d" else False
if debug_mode:
    import os
    infile = open(os.path.basename(__file__).replace(".py", ".in"))

    def input():
        return infile.readline()


# ==============================================================


def main():
    a, b, c = list(map(int, input().strip().split()))
    s = sum((a, b, c))
    x = max(a, b, c)
    steps = 0
    while True:
        if s + steps * 2 == 3 * x:
            break
        elif s + steps * 2 < 3 * x:
            steps += 1
        elif s + steps * 2 > 3 * x:
            x += 1
    print(steps)


main()

# ==============================================================

if debug_mode:
    infile.close()
import math

r = float(raw_input())

S = r ** 2 * pi
R = 2 * r * pi

print "%f %f" %(S,R)

### FIXED CODE ###

import math

r = float(raw_input())

S = r ** 2 * math.pi
R = 2 * r * math.pi

print "%f %f" %(S,R)
def main():
    s=input()
    x,y=map(int,input().split())

    lf = [0]
    tf = 0
    for i in range(len(s)):
        if s[i] =="F":
            lf[tf] += 1
        else:
            lf.append(0)
            tf += 1

    lx = [lf[i] for i in range(len(lf)) if i % 2 == 0]
    ly = [lf[i] for i in range(len(lf)) if i % 2 == 1]
    start =lx.pop(0)
    dpxcenter = sum(lx)
    dpxedge = (dpxcenter+start)*2+10
    dpx = [[False for _ in range(dpxedge)] for _ in range(len(lx)+1)]
    dpx[0][dpxcenter+start+5] = True
    for i in range(len(lx)):
        for j in range(dpxedge):
            if j-lx[i] >= 0:
                dpx[i+1][j] = dpx[i][j-lx[i]]
            if j+lx[i] < dpxedge:
                dpx[i+1][j] = dpx[i+1][j] or dpx[i][j+lx[i]]

    dpycenter = sum(ly)
    dpyedge = dpycenter*2+10
    dpy = [[False for _ in range(dpyedge)] for _ in range(len(ly)+1)]
    dpy[0][dpycenter+5] = True
    for i in range(len(ly)):
        for j in range(dpyedge):
            if j-ly[i] >= 0:
                dpy[i+1][j] = dpy[i][j-ly[i]]
            if j+ly[i] < dpyedge:
                dpy[i+1][j] = dpy[i+1][j] or dpy[i][j+ly[i]]

    if dpx[-1][x+dpxcenter+5] and dpy[-1][y+dpycenter+5]:return "Yes"
    else:return "No"

print(main())

### FIXED CODE ###


def main():
    s=input()
    x,y=map(int,input().split())

    lf = [0]
    tf = 0
    for i in range(len(s)):
        if s[i] =="F":
            lf[tf] += 1
        else:
            lf.append(0)
            tf += 1

    lx = [lf[i] for i in range(len(lf)) if i % 2 == 0]
    ly = [lf[i] for i in range(len(lf)) if i % 2 == 1]
    dpxcenter = sum(lx)
    if abs(x)>dpxcenter: return "No"
    dpxedge = dpxcenter*2+20
    dpx = [[False for _ in range(dpxedge)] for _ in range(len(lx)+1)]
    dpx[1][dpxcenter+lx[0]+10] = True
    for i in range(1,len(lx)):
        for j in range(dpxedge):
            if j-lx[i] >= 0:
                dpx[i+1][j] = dpx[i][j-lx[i]]
            if j+lx[i] < dpxedge:
                dpx[i+1][j] = dpx[i+1][j] or dpx[i][j+lx[i]]

    dpycenter = sum(ly)
    if abs(y)>dpycenter: return "No"
    dpyedge = dpycenter*2+20
    dpy = [[False for _ in range(dpyedge)] for _ in range(len(ly)+1)]
    dpy[0][dpycenter+10] = True
    for i in range(len(ly)):
        for j in range(dpyedge):
            if j-ly[i] >= 0:
                dpy[i+1][j] = dpy[i][j-ly[i]]
            if j+ly[i] < dpyedge:
                dpy[i+1][j] = dpy[i+1][j] or dpy[i][j+ly[i]]

    if dpx[-1][x+dpxcenter+10] and dpy[-1][y+dpycenter+10]:return "Yes"
    else:return "No"

print(main())
import numpy as np
import sys
X, N = np.array(list(map(int, input().split())))
if N == 0:
    print(X)
    sys.exit()
p = np.array(list(map(int, input().split())))
p = np.sort(p)
a = np.ones(203, dtype = np.int)
a[p+103] = 0
m = X
n = 0
for i in range(203):
    if a[i] == 1:
        if m>abs(i-X-103):
            if i-X-103 != 0:
                m = abs(i-X-103)
                n = i-103
print(n)

### FIXED CODE ###

import numpy as np
import sys
X, N = np.array(list(map(int, input().split())))
if N == 0:
    print(X)
    sys.exit()
p = np.array(list(map(int, input().split())))
p = np.sort(p)
a = np.ones(304, dtype = np.int)
a[p+102] = 0
m = X+1000
n = 0
for i in range(304):
    if a[i] == 1:
        if m>abs(i-X-102):
            m = abs(i-X-102)
            n = i-102
print(int(n))
A, B = input().split()
print((A-1)*(B-1))

### FIXED CODE ###

A, B = map(int, input().split())
print((A-1)*(B-1))
s = str(input())
t = str(input())
lst = []
i= 0
for ss in range(len(s)-len(t)+1):
  flg = 1
  i= 0
  for tt in range(len(t)):
    now = ss + tt
    if s[now] == t[tt] or s[now] == '?':
      pass
    else:
      flg = 0
  if flg:
    ns = list(s)
    ns[ss:now+1] = list(t)
    lst.append(("").join(ns))
if lst:
  lst = [_.replace('?','a') for _ in lst]
  sort(lst)
  print(lst[0])

else:
  print('UNRESTORABLE')


### FIXED CODE ###

s = str(input())
t = str(input())
lst = []
i= 0
for ss in range(len(s)-len(t)+1):
  flg = 1
  i= 0
  for tt in range(len(t)):
    now = ss + tt
    if s[now] == t[tt] or s[now] == '?':
      pass
    else:
      flg = 0
  if flg:
    ns = list(s)
    ns[ss:now+1] = list(t)
    lst.append(("").join(ns))
if lst:
  lst = [_.replace('?','a') for _ in lst]
  lst.sort()
  print(lst[0])

else:
  print('UNRESTORABLE')
a = input()
if a%10==7:
  print(True)
elif( a%100 )//10==7:
  print(True)
elif( a//100 )==7:
  print(True)
else:
  print(False)



### FIXED CODE ###

a = input()
a = int(a)
if a%10==7:
  print("Yes")
elif( a%100 )//10==7:
  print("Yes")
elif( a//100 )==7:
  print("Yes")
else:
  print("No")
s = input()
return s[:-4]

### FIXED CODE ###

s = input()
print(s[:-8])
n = input()
digit = len(str(n))

count = -1
for i in range(digit - 1):
  if (i + 1) % 2 == 1:
    count += 10 ** (i + 1)

if digit % 2 == 1:
  count += n - 10 ** (digit - 1) + 1

print(count)

### FIXED CODE ###

n = int(input())
digit = len(str(n))

count = 0
for i in range(digit - 1):
  if (i + 1) % 2 == 1:
    count += 10 ** (i + 1) - (10 ** i)

if digit % 2 == 1:
  count += n - 10 ** (digit - 1) + 1

print(count)
N, T = map(int, input().split())
ans = 'TLE'
cost = float('inf')

for i in range(N):
  c, t = map(int, input().split())
  if t <= T:
    ans = min(ans, c)

print(ans)

### FIXED CODE ###

N, T = map(int, input().split())
ans = float('inf')
cost = float('inf')

for i in range(N):
  c, t = map(int, input().split())
  if t <= T:
    ans = min(ans, c)

if ans < float('inf'):
  print(ans)
else:
  print('TLE')
import math

def step(cur_y, cur_idx, S, dp, end_y):
    if cur_idx >= len(S):
        return
    for idx, (x, y) in enumerate(S[cur_idx:], cur_idx):
        if cur_y <= y and dp[y] < dp[cur_y] + 1:
            dp[y] = dp[cur_y] + 1
            step(y, idx + 1, S, dp, end_y)

x_1, y_1, x_2, y_2 = map(int, input().split())
N = int(input())

if x_1 <= x_2:
    x_s = x_1
    y_s = y_1
    x_t = x_2
    y_t = y_2
else:
    x_s = x_2
    y_s = y_2
    x_t = x_1
    y_t = y_1

x_min = min(x_1, x_2)
x_max = max(x_1, x_2)
y_min = min(y_1, y_2)
y_max = max(y_1, y_2)

S = []
for i in range(N):
    X, Y = map(int, input().split())
    if X < x_min or X > x_max or Y < y_min or Y > y_max:
        continue
    S.append((X, Y))

dist = 0
if x_s == x_t:
    s_found = False
    for x, y in S:
        if x_s == x:
            s_found = True
            break
    if s_found:
        dist = abs(y_t - y_s) * 100 - 20 + math.pi * 20 / 2
    else:
        dist = abs(y_t - y_s) * 100
elif y_s == y_t:
    s_found = False
    for x, y in S:
        if y_s == y:
            s_found = True
            break
    if s_found:
        dist = abs(x_t - x_s) * 100 - 20 + math.pi * 20 / 2
    else:
        dist = abs(x_t - x_s) * 100
else:
    S.sort()
    if y_s > y_t:
        S.reverse()
        start_y = y_t
        end_y = y_s
    else:
        start_y = y_s
        end_y = y_t

    dp = {}
    for y in range(start_y, end_y + 1):
        dp[y] = 0
    step(start_y, 0, S, dp, end_y)
    #print(dp)
    round_count = max(dp.values())
    dist = (abs(x_t - x_s) + abs(y_t - y_s)) * 100 + (math.pi * 20 / 4 - 20) * round_count

print(dist)

### FIXED CODE ###

import math
import bisect

def get_lis(S):
    dp = [float('inf')] * len(S)
    for i, (x, y) in enumerate(S):
        a = S[i][1]
        j = bisect.bisect_right(dp, a)
        dp[j] = a
    return bisect.bisect_left(dp, float('inf'))

x_1, y_1, x_2, y_2 = map(int, input().split())
N = int(input())

if x_1 <= x_2:
    x_s = x_1
    y_s = y_1
    x_t = x_2
    y_t = y_2
else:
    x_s = x_2
    y_s = y_2
    x_t = x_1
    y_t = y_1

x_min = min(x_1, x_2)
x_max = max(x_1, x_2)
y_min = min(y_1, y_2)
y_max = max(y_1, y_2)

S = []
for i in range(N):
    X, Y = map(int, input().split())
    if X < x_min or X > x_max or Y < y_min or Y > y_max:
        continue
    S.append((X, Y))

dist = 0
s_num = len(S)

S.sort()
if y_s > y_t:
    S.reverse()
    start_y = y_t
    end_y = y_s
else:
    start_y = y_s
    end_y = y_t

round_count = get_lis(S)
dist = (abs(x_t - x_s) + abs(y_t - y_s)) * 100 + (math.pi * 20 / 4 - 20) * round_count

if min(abs(x_t - x_s), abs(y_t - y_s)) + 1 == round_count:
    dist += math.pi * 5

print(dist)
# coding: UTF-8
def common_divisor(x,y):
    if x >= y:
        x = x % y
        for i in range(1,x):
            if y % i == 0 and x % i == 0:
                divisor = i
        return divisor
    else:
        for i in range(1,x):
            if y % i == 0 and x % i == 0:
                divisor = i
        return divisor

num1,num2 = raw_input().split()
maximam = common_divisor(int(num1), int(num2))
print(maximam)



### FIXED CODE ###

# coding: UTF-8
def euclidean_algorithm(x,y):
    if x > y:
        p = y
        r = x%y
        while r != 0:
            a = p
            b = r
            p = b
            r = a%b
        return p
    elif x == y:
        return x
    elif x < y:
        p = x
        r = y%x
        while r != 0:
            a = p
            b = r
            p = b
            r = a%b
        return p

num1,num2 = raw_input().split()
maximam = euclidean_algorithm(int(num1), int(num2))
print(maximam)