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

import sys
sys.stdin.readline

n = int(input())
a = []
for _ in range(n):
    sa = input().strip()
    tmp = 0
    for i in range(len(sa)):
        if sa[i] == '.':
            break
        tmp = tmp * 10 + int(sa[i])
    i += 1
    for j in range(i, i + 9):
        if j < len(sa):
            tmp = tmp * 10 + int(sa[j])
        else:
            tmp *= 10
    a.append(tmp)

div25 = [[0, 0] for _ in range(n)]
for i, _a in enumerate(a):
    while _a % 2 == 0:
        div25[i][0] += 1
        _a //= 2
    while _a % 5 == 0:
        div25[i][1] += 1
        _a //= 5

div25.sort(key=lambda x: (-x[1], -x[0]))

plot = [[0 for _ in range(45)] for _ in range(20)]
ans = 0
for d25 in div25:
    rem2, rem5 = max(0, 18 - d25[0]), max(0, 18 - d25[1])
    for j in range(rem5, 20):
        for k in range(rem2, 45):
            ans += plot[j][k]
    plot[d25[1]][d25[0]] += 1
print(ans)

### FIXED CODE ###

import sys
sys.stdin.readline

n = int(input())
a = []
for _ in range(n):
    sa = input().strip()
    tmp = 0
    for i in range(len(sa)):
        if sa[i] == '.':
            break
        tmp = tmp * 10 + int(sa[i])
    i += 1
    for j in range(i, i + 9):
        if j < len(sa):
            tmp = tmp * 10 + int(sa[j])
        else:
            tmp *= 10
    a.append(tmp)

div25 = [[0, 0] for _ in range(n)]
for i, _a in enumerate(a):
    while _a % 2 == 0:
        div25[i][0] += 1
        _a //= 2
    while _a % 5 == 0:
        div25[i][1] += 1
        _a //= 5

div25.sort(key=lambda x: (-x[1], -x[0]))

plot = [[0 for _ in range(45)] for _ in range(20)]
ans = 0
for d25 in div25:
    rem2, rem5 = max(0, 18 - d25[0]), max(0, 18 - d25[1])
    for j in range(rem5, 20):
        for k in range(rem2, 45):
            ans += plot[j][k]
    plot[d25[1]][d25[0]] += 1
print(ans)
### BUGGY CODE ###

def resolve():
    n, m = map(int, input().split())
    a = list(map(int, input().split()))

    for i in range(m):
        a = sorted(a, reverse = True)
        a[0] = a[0]//2
    print(sum(a))
resolve()

### FIXED CODE ###

def resolve():
    import heapq
    n, m = map(int, input().split())
    a = list(map(lambda x:int(x)*-1, input().split()))
    heapq.heapify(a)
    for i in range(m):
        maxa = heapq.heappop(a) * -1
        maxa //= 2
        heapq.heappush(a, -maxa)
    print(sum(a)*-1)
resolve()
### BUGGY CODE ###

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

a=[n]
i=0
while True:
    a.append(abs(a[i]-k))

    if a[i+1]>=a[i]:
        print(a[i])
        break
    i=i+1
    

### FIXED CODE ###

n,k=map(int,input().split())
n=n%k
a=min(n,abs(n-k))
print(a)
### BUGGY CODE ###

a = int(input())
l = input()
dp = [0]*1110
qp = [0]*1110
L = []
#print('###############')
def bfs(i,x,y):
	#print(i,x)
	if y == 3:
		qp[int(x)] = 1
		return 0
	else:
		for j in range(i,a):
			if x+str(l[j]) not in L:bfs(j+1,x+str(l[j]),y+1)
			L.append(x+str(l[j]))
bfs(0,'',0)
print(sum(qp))

### FIXED CODE ###

a = int(input())
b = input()
ans = 0
for i in range(1000):
	T = '0'*(3-len(str(i)))
	t = T+ str(i)
	I = 0
	while I < 3:
		for j in b:
			#if t == '022':print(I,t[I],j)
			if I == 3:
				break
			if t[I] == j:I+=1
			#if t == '022':print(I,j)
		
		if I == 3: 
			#print(t)
			ans +=1
		break
print(ans)
### BUGGY CODE ###

a=int(input())
b=input()
counter=0
for i in range(a):
    for j in range(i+1,a):
        for k in range(j+1,a):
            if b[i]!=b[j] and b[j]!=b[k] and b[k]!=b[i]:
                if j-i!=k-j:
                    counter+=1
print(counter)

### FIXED CODE ###

a=int(input())
moji=input()
r=[]
g=[]
b=[]
for i in range(a):
    if moji[i]=="R":
        r.append(i)
    elif moji[i]=="G":
        g.append(i)
    else:
        b.append(i)
res=len(r)*len(g)*len(b)
if len(r)==0 or len(g)==0 or len(b)==0:
    print(0)
else:
    for i in range(0,a-2):
      for j in range(i+1,a-1):
        if 2*j-i<a and moji[i]!=moji[j] and moji[j]!=moji[2*j-i] and moji[2*j-i]!=moji[i]:
          res-=1
    print(res)
### BUGGY CODE ###

n, m = map(int, input().split())
h = list(map(int, input().split()))
#h = [[i, h[i-1]] for i in range(1, n+1)]
#path = [list(map(int, input().split())) for i in range(m)]
#conn = {key: [] for key in range(1, n+1)}
tower = list(range(1, n+1))


for i in range(m):
    p = list(map(int, input().split()))
    # h0 > h1
    if h[p[0]-1] == h[p[1]-1]:
        if p[0] in tower:
            tower.remove(p[0])
        if p[1] in tower:
            tower.remove(p[1])
    elif h[p[0]-1] > h[p[1]-1]:
        if p[1] in tower:
            tower.remove(p[1])
    else:
        if p[0] in tower:
            tower.remove(p[0])

print(len(tower), end="")


### FIXED CODE ###

n, m = map(int, input().split())
h = list(map(int, input().split()))
# h = [[i, h[i-1]] for i in range(1, n+1)]
# path = [list(map(int, input().split())) for i in range(m)]
# conn = {key: [] for key in range(1, n+1)}
tower = list(range(1, n+1))
ma = [0]*n

for i in range(m):
    p = list(map(int, input().split()))
    ma[p[0]-1] = max(ma[p[0]-1], h[p[1]-1])
    ma[p[1]-1] = max(ma[p[1]-1], h[p[0]-1])
    """
    # h0 > h1
    if h[p[0]-1] == h[p[1]-1]:
        if p[0] in tower:
            tower.remove(p[0])
        if p[1] in tower:
            tower.remove(p[1])
    elif h[p[0]-1] > h[p[1]-1]:
        if p[1] in tower:
            tower.remove(p[1])
    else:
        if p[0] in tower:
            tower.remove(p[0])
    """
cnt = 0
for i in range(n):
    cnt += (h[i] > ma[i])
print(cnt, end="")
### BUGGY CODE ###

# -*- coding: utf-8 -*-
#グローバル変数
pn_list = [2,3]

def next_pn(pn):
    npn = pn + 2
    pn_flg = 0
    while pn_flg == 0:
        for i in pn_list:
            if npn % i == 0:
                break
            if (i ** 2) > npn:
                pn_flg = 1
                break
        if pn_flg == 1:
            break # 素数が見つかったらbreak
        else:
            npn += 2
    pn_list.append(npn)
    return npn

def check_a(n,a):
    res = "ok"
    for i in range(n):
        if a[i] > 1:
            res = "notyet"
    return res

# 整数の入力
n = int(input())
s = input()
a = [int(x) for x in s.split()]
aa = [int(x) for x in s.split()]

#素数作成
sqr_max_a = int((1.0 * 10**6) ** 0.5) + 1
#sqr_max_a = int(1.0 * 10**6)
pn = 3
while pn < sqr_max_a:
    pn = next_pn(pn)

# a を素因数分解する
pn_lcm = []
for i in pn_list:
    wareta = 1
    while wareta == 1:
        wareta = 0
        for j in range(n):
            if a[j] % i == 0:
                a[j] = a[j] // i
                wareta = 1
        if wareta == 1:
            pn_lcm.append(i)
    if check_a(n,a) == "ok":
        break

for i in a:
    if i > 1:
        if i not in pn_lcm:
            pn_lcm.append(i)

lcm = int(1)
for j in pn_lcm:
    lcm = lcm * j

min_bsum = int(0)
for i in aa:
    min_bsum = min_bsum + lcm // i

print(min_bsum % (10**9+7))

### FIXED CODE ###

# -*- coding: utf-8 -*-
#グローバル変数
pn_list = [2,3]

def next_pn(pn):
    npn = pn + 2
    pn_flg = 0
    while pn_flg == 0:
        for i in pn_list:
            if npn % i == 0:
                break
            if (i ** 2) > npn:
                pn_flg = 1
                break
        if pn_flg == 1:
            break # 素数が見つかったらbreak
        else:
            npn += 2
    pn_list.append(npn)
    return npn

# 整数の入力
n = int(input())
s = input()
a = [int(x) for x in s.split()]
aa = [int(x) for x in s.split()]

#素数作成
sqr_max_a = int((1.0 * 10**6) ** 0.5) + 1
#sqr_max_a = int(1.0 * 10**6)
pn = 3
while pn < sqr_max_a:
    pn = next_pn(pn)

# a を素因数分解する
lcm = int(1)
for i in pn_list:
    wareta = 1
    while wareta == 1:
        wareta = 0
        for j in range(n):
            if a[j] % i == 0:
                a[j] = a[j] // i
                wareta = 1
        if wareta == 1:
            lcm = lcm * i
pn_lcm = []
for i in a:
    if i > 1:
        if i not in pn_lcm:
            pn_lcm.append(i)
            lcm = lcm * i

min_bsum = int(0)
for i in aa:
    min_bsum = min_bsum + lcm // i

print(min_bsum % (10**9+7))
### BUGGY CODE ###

S = input()
N = len(S)
while True:
  n = len(S)
  S = S.replace("01", "")
  S = S.replace("10", "")
  if len(S) == n:
    break
#print(N, S)
r = N-len(S)
print(r)


### FIXED CODE ###

S = input()
N = len(S)
N0 = S.count("0")
N1 = S.count("1")
r = 2*min(N0, N1)
print(r)
### BUGGY CODE ###

N, M = map( int, input().split() )
L = [[]] * M

for i in range( N ):
  a, b = map( int, input().split() )
  if a - 1 < M:
    if L[ a - 1 ] == []:
      L[ a - 1 ] = [ b ]
    else:
      L[ a - 1 ].append( b )
      
ret = 0
C = []
for i in range( M ):
  C = sorted( L[i] + C )
  if C != []:
    ret += C.pop( -1 )

print( ret )


### FIXED CODE ###

import heapq as hp

N, M = map( int, input().split() )
L = [[]] * M

for i in range( N ):
  a, b = map( int, input().split() )
  if a - 1 < M:
    if L[ a - 1 ] == []:
      L[ a - 1 ] = [ b ]
    else:
      L[ a - 1 ].append( b )
      
ret = 0
C = []
hp.heapify( C )
for i in range( M ):
  for i in L[i]:
    hp.heappush( C, -i)
  if C != []:
    ret -= hp.heappop( C )

print( ret )
### BUGGY CODE ###

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

for i in range(H):
	a = list(map(int,input().split()))
	A[i] = a
for i in range(H):
	b = list(map(int,input().split()))
	B[i] = b

D = [[abs(A[i][j] - B[i][j]) for j in range(W)] for i in range(H)]
R = 160*80
dp = [[[False for k in range(R)] for j in range(W)] for i in range(H)]
dp[0][0][D[0][0]] = True
for i in range(H):
	for j in range(W):
		for n in range(R):
			if not dp[i][j][n]:
				continue
			if j != W-1:
				d = D[i][j+1]
				dp[i][j+1][n+d] = True
				dp[i][j+1][abs(n-d)] = True
			if i != H-1:
				d = D[i+1][j]
				dp[i+1][j][n+d] = True
				dp[i+1][j][abs(n-d)] = True

h,w = H-1, W-1
for i in range(R):
	if dp[h][w][i]:
		print(i)
		exit()

### FIXED CODE ###

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

for i in range(H):
	a = list(map(int,input().split()))
	A[i] = a
for i in range(H):
	b = list(map(int,input().split()))
	B[i] = b

D = [[abs(A[i][j] - B[i][j]) for j in range(W)] for i in range(H)]
R = 160*80
"""
dp = [[[False for k in range(R)] for j in range(W)] for i in range(H)]
dp[0][0][D[0][0]] = True
for i in range(H):
	for j in range(W):
		r = 80 * (i+j+2)
		for n in range(r):
			if not dp[i][j][n]:
				continue
			if j != W-1:
				d = D[i][j+1]
				dp[i][j+1][n+d] = True
				dp[i][j+1][abs(n-d)] = True
			if i != H-1:
				d = D[i+1][j]
				dp[i+1][j][n+d] = True
				dp[i+1][j][abs(n-d)] = True

"""
dp = [[0 for j in range(W)] for i in range(H)]
dp[0][0] = 2**(R + D[0][0]) | 2**(R - D[0][0])
for i in range(H):
	for j in range(W):
		if j != W-1:
			d = D[i][j+1]
			dp[i][j+1] |= (dp[i][j] << d | dp[i][j] >> d)
		if i != H-1:
			d = D[i+1][j]
			dp[i+1][j] |= (dp[i][j] << d | dp[i][j] >> d)
h,w = H-1, W-1
for i in range(R):
	mask = 2 ** (R+i) | 2 ** (R-i)
	if dp[h][w] & mask > 0:
		print(i)
		exit()
### BUGGY CODE ###

ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

h,w = nm()

s = []

for y in range(h):
  s.append([_ for _ in input()])



def bfs(sx,sy,gx,gy,route):
  xx=[1,-1,0,0]
  yy=[0,0,1,-1]
  
  if sx == gx and sy == gy:
    return 0
  
  mn = 9999
  for i in range(4):
    nx = sx + xx[i]
    ny = sy + yy[i]
    
    if 0 <= nx < w and 0 <= ny < h:
      if s[ny][nx] == '.':
        if (nx,ny) not in route:
          mn = min(mn,bfs(nx,ny,gx,gy,route+[(nx,ny)]))
  return mn+1

mx = 0

for sx in range(w):
  for sy in range(h):
    for gx in range(w):
      for gy in range(h):
        if s[sy][sx] == '.' and s[gy][gx] == '.':
          b = bfs(sx,sy,gx,gy,[])
          if b < h*w:
            mx = max(mx,b)

print(mx)

### FIXED CODE ###

ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

from collections import deque

h,w = nm()

s = []

for y in range(h):
  s.append([_ for _ in input()])



def bfs(sx,sy,visited):
  xx=[1,-1,0,0]
  yy=[0,0,1,-1]
  
  q=deque([(sx,sy)])
  visited[sy][sx] = 0

  while q:
    _ = q.popleft()
    x=_[0]
    y=_[1]

    for i in range(4):
      nx = x + xx[i]
      ny = y + yy[i]
      
      if 0 <= nx < w and 0 <= ny < h:
        if s[ny][nx] == '.' and visited[ny][nx]==-1:
          visited[ny][nx] = visited[y][x]+1
          q.append((nx,ny))
  mx=0
  for y in range(h):
    for x in range(w):
      mx = max(mx,visited[y][x])
  return mx

MX = 0

for sx in range(w):
  for sy in range(h):
    if s[sy][sx] == '.':
      b = bfs(sx,sy,[[-1]*w for _ in range(h)])
      MX = max(MX,b)

print(MX)
### BUGGY CODE ###

a,b,c=map(int,input().split())
d=[]
for i in range(c+1):
    e=(a*i)//b-a*(i//b)
    d.append(e)
print(max(d))


### FIXED CODE ###

import math
a,b,c=map(int,input().split())
if b>c:
    print(math.floor((a*c)/b)-a*(math.floor(c/b)))
else:
    print(math.floor((a*(b-1))/b)-a*(math.floor((b-1)/b)))
### BUGGY CODE ###

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

ai = []
ans = 0

for i in range(n):
    ai.append(i + l[i])

for j in range(n):
    ans = ans + ai.count(j - l[j])

print(ans)


### FIXED CODE ###

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

a=[]
b={}
ans=0

for i in range(n):
    a.append(i+l[i])
    b[i-l[i]] = b.get(i-l[i],0) + 1

for av in a:
    ans = ans + b.get(av,0)

print(ans)
### BUGGY CODE ###

a,b=map(int,input().split())
n = input()
for i in range(b):
  s,t=map(int,input().split())
  count=0
  for j in range(s-1,t-1):
    if n[j:j+2]=="AC":
      count+=1
  print(count)

### FIXED CODE ###

a,b=map(int,input().split())
n = input()
m = [0]*a
for i in range(1,a):
  if n[i-1:i+1]=="AC":
    m[i]=m[i-1]+1
  else:
    m[i]=m[i-1]
for j in range(b):
  s,t=map(int,input().split())
  print(m[t-1]-m[s-1])
### BUGGY CODE ###

N, Q = map(int,input().split())
S = input()
for i in range(Q):
  l,r = map(int,input().split())
  chk = S[l-1:r]
  print(chk.count("AC"))


### FIXED CODE ###

N, Q = map(int, input().split())
S = input()
t = [0] * (N + 1)
for i in range(N):
  t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
for i in range(Q):
  l, r = map(int, input().split())
  print(t[r-1] - t[l-1])
### BUGGY CODE ###

import math

def is_prime_num(in_num):
    cnt = 0
    if in_num == 2:
        return True
    elif in_num <= 1:
        return False
    elif in_num % 2 == 0:
        return False
    else:
        max_num = int(math.sqrt(in_num))
        for j in range(3, in_num, 2):
            if in_num % j == 0:
                cnt = cnt + 1
                break
                    
        if cnt == 0:
            #?´???°
            return True
        else:
            return False


while True:
    try:
        n = int(input())
        prime_cnt = 0

        for i in range(2, n+1):
            if is_prime_num(i):
                #?´???°
                prime_cnt = prime_cnt + 1
                

        print(str(prime_cnt))
    except:
        break
    

### FIXED CODE ###

#init
max_num = 1000000
is_prime_num = [True for i in range (max_num+1)]

#0, 1 --- not prime number
is_prime_num[0] = False
is_prime_num[1] = False
end = int(max_num ** .5)

for i in range(2, end+1):
    if is_prime_num[i]:
        for j in range(i*i, max_num+1, i):
            is_prime_num[j] = False


while True:
    try:
        n = int(input())
        prime_cnt = 0
        for i in range(1, n+1):
            if is_prime_num[i]:
                prime_cnt = prime_cnt + 1
                   
   
        print(str(prime_cnt))
    except:
        break
### BUGGY CODE ###

s=input()
t=input()
n=len(s)
m=len(t)

dp=[[0]*(m+1) for i in range(n+1)]

for i in range(n):
  for j in range(m):
    if s[i]==t[j]:
      dp[i+1][j+1]=dp[i][j]+1

    else:
      dp[i+1][j+1]=max(dp[i][j+1],dp[i+1][j])

#print(dp[n][m])

ans=''
while n>=0 and m>=0:
  if dp[n][m]==dp[n-1][m]:
    n-=1

  elif dp[n][m]==dp[n][m-1]:
    m-=1

  else:
    n-=1
    m-=1
    ans+=s[n]

print(ans[::-1])

### FIXED CODE ###

s=input()
t=input()
n=len(t)
m=len(s)
dp=[[0]*(n+1) for i in range(m+1)]
for i in range(m):
  for j in range(n):
    if s[i]==t[j]:
      dp[i+1][j+1]=dp[i][j]+1

    else:
      dp[i+1][j+1] = max(dp[i+1][j], dp[i][j+1])

        
kotae = []
 
while(i >= 0 and j >= 0):
    if(dp[i+1][j+1] == dp[i][j+1]):
        i -= 1
    elif(dp[i+1][j+1] == dp[i+1][j]):
        j -= 1
    else:
        i -= 1
        j -= 1
        kotae.append(s[i+1])


kotae.reverse()
kotae = "".join(kotae)
print(kotae)
### BUGGY CODE ###

import sys

sys.setrecursionlimit(1000000000)
mod = 10**9+7
N, M = map(int, input().split())
S = list(map(int, input().split()))
T = list(map(int, input().split()))
memo = [[-1]*(M+1) for _ in range(N)]
List = [[]for _ in range(N)]

for i in range(N):
    for j in range(M):
        if S[i]==T[j]:
            List[i].append(j)
def dp(i, j):
    if i==N-1:
        cnt = 0
        for k in List[i]:
            if j<k:
                cnt+=1
        return (cnt+1)%mod
    res = 0
    for k in List[i]:
        if j<k:
            if memo[i+1][k]<0:
                memo[i+1][k]=dp(i+1, k)
            res+=memo[i+1][k]
    if memo[i+1][j]<0:
        memo[i+1][j]=dp(i+1, j)
    res+=memo[i+1][j]
    return res%mod
print(dp(0, -1)%mod)


### FIXED CODE ###

mod = 10**9+7
N, M = map(int, input().split())
S = list(map(int, input().split()))
T = list(map(int, input().split()))
dp = [[0]*(M+1) for _ in range(N+1)]
dp[0][0] = 1
Sum = [[1]*(M+1) for _ in range(N+1)]
for i in range(1, N+1):
    for j in range(1, M+1):
        if S[i-1] == T[j-1]:
            dp[i][j] = Sum[i-1][j-1]%mod
        else:
            dp[i][j] = 0
        Sum[i][j] = (Sum[i-1][j]+Sum[i][j-1]-Sum[i-1][j-1]+dp[i][j])%mod
print(Sum[N][M]%mod)
### BUGGY CODE ###

def wczytaj_liste(): 
    wczytana_lista = input()
    lista_znakow = wczytana_lista.split()
    ostateczna_lista = []
    for element in lista_znakow:
        ostateczna_lista.append(int(element))
    return ostateczna_lista

def potworny_Jan_Kanty():
    N = wczytaj_liste()[0]
    potwory = wczytaj_liste()
    wynik = {}
    for dlugosc_przedzialu in range(1,len(potwory)+1):
        for poczatek in range(len(potwory)-dlugosc_przedzialu+1): 
            koniec = dlugosc_przedzialu + poczatek
            if dlugosc_przedzialu == 1:
                wynik[poczatek,koniec] = 0
            else:
                odp = 10**18
                for i in range(1, dlugosc_przedzialu):
                    kandydat = wynik[poczatek+i,koniec]+wynik[poczatek, poczatek+i]
                    if kandydat < odp: 
                        odp = kandydat
                wynik[poczatek, koniec] = odp+sum(potwory[poczatek:koniec])
    print(wynik[0, N])
    
potworny_Jan_Kanty()

### FIXED CODE ###

def wczytaj_liste(): 
    wczytana_lista = input()
    lista_znakow = wczytana_lista.split()
    ostateczna_lista = []
    for element in lista_znakow:
        ostateczna_lista.append(int(element))
    return ostateczna_lista 

def potworny_Jan_Kanty():
    N = wczytaj_liste()[0]
    potwory = wczytaj_liste()
    wynik = [[None for i in range(N+1)]for j in range(N+1)]
    for dlugosc_przedzialu in range(1,len(potwory)+1):
        for poczatek in range(len(potwory)-dlugosc_przedzialu+1): 
            koniec = dlugosc_przedzialu + poczatek
            if dlugosc_przedzialu == 1:
                wynik[poczatek][koniec] = 0
            else:
                odp = 10**18
                for i in range(1, dlugosc_przedzialu):
                    kandydat = wynik[poczatek+i][koniec]+wynik[poczatek][poczatek+i]
                    if kandydat < odp: 
                        odp = kandydat
                wynik[poczatek][koniec] = odp+sum(potwory[poczatek:koniec])
    print(wynik[0][N])
    
potworny_Jan_Kanty()
### BUGGY CODE ###

x = int(input())
from collections import deque
q = deque([0])

prices = [100, 101, 102, 103, 104, 105]

while q:
    cost = q.pop()

    if cost > x:
        continue
    elif any([(x-cost)%p == 0 for p in prices]):
        print(1)
        break

    for p in prices:
        q.append(cost+p)
else:
    print(0)

### FIXED CODE ###

x = int(input())
c = 1
while True:
    if c*100 <= x <= c*105:
        print(1)
        break

    if c*100 > x:
        print(0)
        break
    c += 1
### BUGGY CODE ###

N, P = map(int,input().split())
if N == 1:
    print(P)
    exit(0)

ans = 1
k = 1
while k**N <= P:
    if P%(k**N)==0:
        ans = k
    k += 1

print(ans)

### FIXED CODE ###

from collections import Counter
import math

N, P = map(int,input().split())
if N >= 41:
    print(1)
    exit(0)
if N >= P:
    print(1)
    exit(0)
if N == 1:
    print(P)
    exit(0)
if N == 2:
    M = P
    Q = []
    k = 2
    while k*k <= M:
        if M%k == 0:
            M //= k
            Q.append(k)
        else:
            k += 1
    if M > 1:
        Q.append(M)
    R = Counter(Q)
    ans = 1
    for k in R:
        if R[k] >= 2:
            ans *= k**(R[k]//2)
    print(ans)
    exit(0)

ans = 1
k = 1
while pow(k,N) <= P:
    if P%pow(k,N)==0:
        ans = k
    k += 1

print(ans)
### BUGGY CODE ###

N , M = map(int,input().split())
s = sorted([list(map(int,input().split())) for _ in range(M)])

ans = "IMPOSSIBLE"
for m in range(M):
  if s[m][0] == 1:
    relay_point = s[m][1]
    for m2 in range(m+1, M):
      if (s[m2][0] == relay_point) and ( s[m2][1] == N):
        ans = "POSSIBLE"
        break
print(ans)

### FIXED CODE ###

N , M = map(int,input().split())
s = [list(map(int,input().split())) for _ in range(M)]

ans = "IMPOSSIBLE"

start_candidate = [X[1] for X in s if X[0]==1 ]
goal_candidate = [X[0] for X in s if X[1]==N]

ans = len(start_candidate)+len(goal_candidate)-len(set(start_candidate+goal_candidate))
if ans != 0:
  print("POSSIBLE")
else:
  print("IMPOSSIBLE")
### BUGGY CODE ###

r,g,b,n=list(map(int,input().split()))
i,j,k=0,0,0
R,G,B=0,0,0
c=0
while R<n:
    R=r*i
    while G<=n-R:
        G=g*j
        B,k=0,0
        while B<=n-R-G:
            B=b*k
            if n-R-G-B==0:
                c+=1
            k+=1
        j+=1
    i+=1
    G,j=0,0
print(c)


### FIXED CODE ###

r,g,b,n=list(map(int,input().split()))
i,j=0,0
R,G=0,0
c=0
while R<=n:
    while G<=n-R:
        if (n-R-G)%b==0:
            c+=1
        G+=g
    G=0
    R+=r

print(c)
### BUGGY CODE ###

#!/usr/bin/env python3
import sys
import numpy as np
import bisect

def solve(N: int, L: "List[int]"):
    L = np.array(sorted(L))
    ct = 0
    for a in range(len(L)-2):
        a_ = L[a]
        for b in range(a+1, len(L)-1):
            b_in = bisect.bisect_left(L[b+1:],a_+L[b])
            # print("L :{} a+Lb :{}  b_in:{}".format(L[b+1:],a_+L[b],b_in))
            # if len(L[b+1:]) == b_in:
                # c_ = 0
            c_ = b_in
            if c_>0:
                ct+=c_   
        # [(L[b+1:] < a_+L[b]).sum() for b in range(a+1, len(L)-1)]
    print(ct)

    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    L = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, L)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
# import numpy as np
import bisect

def solve(N: int, L: "List[int]"):
    L = sorted(L)
    ct = 0
    for a in range(len(L)-2):
        a_ = L[a]
        for b in range(a+1, len(L)-1):
            b_in = bisect.bisect_left(L,a_+L[b]) - b -1
            if b_in > 0:
                ct+=b_in

            # print("L :{} a+Lb :{}  b_in:{}".format(L[b+1:],a_+L[b],ct))
        # ct += sum([bisect.bisect_left(L[b+1:],a_+L[b]) for b in range(a+1, len(L)-1)])
    print(ct)

    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    L = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, L)

if __name__ == '__main__':
    main()