Harryxun/stf_run huggingface dataset:
A,B,K = list(map(int, input().split()))
x=[]

for i in range(max(A,B)):
  if A%i==B%i==0:
    x.append(i)

print(x[K-1])

### FIXED CODE ###

A,B,K = list(map(int, input().split()))
x=[]
count=0 
for i in range(max(A,B)+1):
  if A%(i+1)==B%(i+1)==0:
    x.append(i+1)
    count+=1
 
print(x[count-K])
a = int(input())
b = int(input())

if a >= 9 or b >= 9:
    print(":(")
else:
    print("Yay!")


### FIXED CODE ###

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

if a >= 9 or b >= 9:
    print(":(")
else:
    print("Yay!")
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n, k;  
  cin >> n >> k ;

  int ans = 0;
  int x;
  for (int i=0; i<n; i++) {
    cin >> x;
    ans += min(x*2, (k-x)*2);
  }

  cout << ans << endl;
}


### FIXED CODE ###

n = int(input())
k = int(input())
x = list(map(int, input().split()))
ans = 0

for i in x:
    ans += min(i*2, (k-i)*2)
    
print(ans)
from scipy.sparse.csgraph import csgraph_from_dense, dijkstra
import numpy as np

N = int(input())

G = np.full((N, N), 10**12)

if N==1:
    print(1)
else:
    for i in range(N-1):
        u, v, w = map(int, input().split())
        G[u-1][v-1] = w
        G[v-1][u-1] = w

    # G2 = csgraph_from_dense(G, null_value=10**12)
    # d = dijkstra(G2, indices=0)

    for dist in d:
        if dist % 2 == 0:
            print(1)
        else:
            print(0)


### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)


N = int(input())
G = [[] for i in range(N)]

for i in range(N-1):
    u, v, w = map(int, input().split())
    if w % 2 == 0:
        G[u-1].append((v-1, 1))
        G[v-1].append((u-1, 1))
    else:
        G[u-1].append((v-1, -1))
        G[v-1].append((u-1, -1))

color = [None for i in range(N)]


def set_color(v, c):
    color[v] = c
    for next_v, d in G[v]:
        if color[next_v] is None:
            set_color(next_v, d*c)


set_color(0, 1)

for c in color:
    if c == 1:
        print(1)
    else:
        print(0)
N=int(input())
L=[2,1]

for i in range(2,N):
  L.append(L[i-1]+L[i-2])
print(L[N+1])
  

### FIXED CODE ###

N=int(input())
L=[2,1]
 
for i in range(2,N+2):
  L.append(L[i-1]+L[i-2])

print(L[N])
a,b = map(int,input().split())
b = 100*b
print((a*b)//100)

### FIXED CODE ###

a,b = input().split()
a = int(a)
b = int(''.join(b.split('.')))

print((a*b)//100)
N = int(input())
s = list(input() for i range(N))
M = int(input())
t = list(input() for i range(M))

s_set = list(set(s))
ans = 0
for name in s_set:
    count = s.count(name) - t.count(name)
    ans = max(count, ans)

print(ans)


### FIXED CODE ###

N = int(input())
s = list(input() for i in range(N))
M = int(input())
t = list(input() for i in range(M))

s_set = list(set(s))
ans = 0
for name in s_set:
    count = s.count(name) - t.count(name)
    ans = max(count, ans)

print(ans)
# cf17-finalA - AKIBA
def main():
    S = input().rstrip()
    flg = S.replace("A", "") == "KIHBR" and "AA" not in S and "KA
    print("YES" if flg else "NO")


if __name__ == "__main__":
    main()

### FIXED CODE ###

# cf17-finalA - AKIBA
def main():
    S = input().rstrip()
    flg = (
        S.replace("A", "") == "KIHBR"
        and "AA" not in S
        and "KA" not in S
        and "IA" not in S
    )
    print("YES" if flg else "NO")


if __name__ == "__main__":
    main()
AB, BC, AC = [int(_) for _ in raw_input().split(" ")]

M = [[0, AB, AC],
     [AB, 0, BC],
     [AC, BC, 0]]

def A(l):
    t = [0] * l
    def Sub(targetList, n):
        if 1:
            if len(targetList) == 1:
                t[n] = targetList[0]
                yield t
                t[n] = 0
            for i in range(len(targetList)):
                p = targetList[:i] + targetList[i+1:]
                t[n] = targetList[i]
                for j in Sub(p, n+1):
                    yield j
        else:
            pass
    
    for i in (Sub(tuple(range(l)), 0)):
        yield i

_min = 10**100
for i in A(3):
    _sum = 0
    for j in range(1, len(i)):
        _from = i[j-1]
        _to = i[j]        
        _sum += M[_from][_to]
    #print (_sum)
    if _min > _sum:
        _min = _sum
print (_sum)
        

### FIXED CODE ###

l = [int(_) for _ in raw_input().split(" ")]
l.sort()
print l[0] + l[1]
# -*- coding: utf-8 -*-
N = int(input())
a = list(map(int, input().split()))

if N % 2 == 0:
    print(" ".join(a[N::-2] + a[::2]))
else:
    print(" ".join(a[N::-2] + a[1::2]))


### FIXED CODE ###

# -*- coding: utf-8 -*-
N = int(input())
a = input().split()

if N % 2 == 0:
    b = a[N::-2] + a[::2]
else:
    b = a[N::-2] + a[1::2]

print(" ".join(b))
import math
Q = int(input())

def prime(p):
    for i in range(2, int(math.sqrt(p))+1):
        if p % i == 0:
            return False
    return True

# エラトステネスの篩
data = [1]*10**5
data[0], data[1] = 0, 0
for j in range(2, len(data)):
    if prime(j) == True:
        for k in range(j*2, len(data), j):
            data[k] = 0


# 2017 like
for e in range(2, len(data))[::-1]:
    if data[e] == 1 and (e) % 2 == 1:
        if data[int((e+1)/2)] == 0:
            data[e] = 0
    else:
        data[e] = 0
# 累積和
t = [0]*len(data)
for a in range(len(data)-1):
    t[a+1] = t[a] + data[a]

for b in range(Q):
    l, r = map(int, input().split(" "))
    print(t[r+1] - t[l])

### FIXED CODE ###

import math 

def prime(n):
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return 0
    return 1

#エラトステネスのふるい
MAX =100000
is_prime = [1]*(MAX+1)
is_prime[0] = 0 
is_prime[1] = 0
for i in range(2,MAX+1):
    if prime(i) == 1:
        j = i*2
        while j <= MAX:
            is_prime[j] = 0
            j += i

#２０１７のような数かどうか
a = [0]*(MAX+1)
for i in range(0,MAX):
    if i % 2 == 1:
        if is_prime[i]==1 and is_prime[int((i+1)/2)]==1:
            a[i] = 1

#累積和
s = [0] * (MAX+1)
for i in range(0,MAX):
    s[i+1] = s[i] + a[i]

#クエリ処理
Q = int(input())
for q in range(Q):
    l,r = map(int,input().split())
    r += 1

    print(s[r]-s[l])
n=input()
data=list(int, input().split())
print('%d %d %d' %(min(data), max(data), sum(data) )

### FIXED CODE ###

n=int(input())
data=list(map(int, input().split()))
print('%d %d %d' % (min(data), max(data), sum(data) ))
def phyonkichi(p, n):
    yoko = 0
    tate = 1
    s = dic[n]
    p_lis = [(p[yoko]+a[yoko], p[tate]+a[tate]) for a in jump]
    s_lis = [(s[yoko]+a[yoko], s[tate]+a[tate]) for a in sprinkler]
    c_lis = []
    for v in list(set(p_lis) & set(s_lis)):
        if 0 <= v[yoko] <= 9 and 0 <= v[tate] <= 9:
            c_lis.append(v)
            
    if n == N:
        if c_lis:
            print 'OK'
            return True
        else:
            return
            
    for v in c_lis:
        if phyonkichi(v, n+1): return True
        
        
jump = [(2,-1),(2,0),(2,1),
        (-1,-2),(0,-2),(1,-2),
        (-2,1),(-2,0),(-2,-1),
        (-1,2),(0,2),(1,2)]

sprinkler = [(0,0),(1,0),(1,-1),
             (0,-1),(-1,-1),(-1,0),
             (-1,1),(0,1),(1,1)]

while True:
    w, h = map(int, raw_input().split(' '))
    if w == 0 and h == 0: break
    N = int(raw_input())
    lis = raw_input().split(' ')
    c_lis = [lis[i:i+2] for i in range(0, 20, 2)]
    dic = {}
    for i, c in enumerate(c_lis):
        dic[i+1] = (int(c[0]), int(c[1]))
    else:
        if not phyonkichi((w, h), 1):
            print 'NA'

### FIXED CODE ###

def phyonkichi(p, n):
    yoko = 0
    tate = 1
    s = dic[n]
    p_lis = [(p[yoko]+a[yoko], p[tate]+a[tate]) for a in jump]
    s_lis = [(s[yoko]+a[yoko], s[tate]+a[tate]) for a in sprinkler]
    c_lis = []
    for v in list(set(p_lis) & set(s_lis)):
        if 0 <= v[yoko] <= 9 and 0 <= v[tate] <= 9:
            c_lis.append(v)
    if c_lis:
        if n == N:
            print 'OK'
            return True
        else:
            for v in c_lis:
                if phyonkichi(v, n+1): return True
    else:
        return
        
jump = [(2,-1),(2,0),(2,1),
        (-1,-2),(0,-2),(1,-2),
        (-2,1),(-2,0),(-2,-1),
        (-1,2),(0,2),(1,2)]

sprinkler = [(0,0),(1,0),(1,-1),
             (0,-1),(-1,-1),(-1,0),
             (-1,1),(0,1),(1,1)]

while True:
    w, h = map(int, raw_input().split(' '))
    if w == 0 and h == 0: break
    N = int(raw_input())
    lis = raw_input().split(' ')
    lis = [lis[i:i+2] for i in range(0, 2*N, 2)]
    dic = {}
    for i, c in enumerate(lis):
        dic[i+1] = (int(c[0]), int(c[1]))
    else:
        if not phyonkichi((w, h), 1):
            print 'NA'
n = int(input())
if n == 0:
    print(2)
elif n == 1:
    print(1)
else:
    l1 = 2
    l2 = 1
    l3 = 0
    for i in range(n-1):
        l3 = l1
        l1 = l2
        l2 += l3
print(l2)

### FIXED CODE ###

n = int(input())
if n == 0:
    print(2)
elif n == 1:
    print(1)
else:
    l1 = 2
    l2 = 1
    l3 = 0
    for i in range(n-1):
        l3 = l1
        l1 = l2
        l2 += l3
    print(l2)
S = input()
buffer = 0
if len(S) != 2:
  buffer = S[0]
  S[0] = S[2]
  S[2] = buffer
print(S)
  

### FIXED CODE ###

S = input()
if len(S) == 2:
  print(S)
else:
  for i in range(len(S)):
    print(S[len(S) - i - 1],end = "")
a, b = map(int,input().split)
area = a * b
perimeter = (a + b) * 2
ptint(str(area) + ' ' + str(perimeter))


### FIXED CODE ###

a, b = map(int,input().split())
area = a * b
perimeter = (a + b) * 2
print(str(area) + ' ' + str(perimeter))
s = list(input())

t = list("AKIHABARAz")
cnt = 0

if len(s) > len(t)-1:
    print("NO")
    exit()

for i in range(len(s)):
    if s[i] == t[cnt]:
        cnt += 1
        continue
    else:
        if t[cnt] == "A":
            cnt += 1
            if t[cnt] == s[i]:
                cnt += 1
                continue
            else:
                print("NO")
                eixt()
        else:
            print("NO")
            exit()
            
if cnt >= 7:
    print("YES")
else:
    print("NO")
            

### FIXED CODE ###

s = input()

check = ["KIHBR","KIHBRA","KIHBAR","KIHBARA","KIHABR","KIHABRA","KIHABAR","KIHABARA","AKIHBR","AKIHBRA","AKIHBAR","AKIHBARA","AKIHABR","AKIHABRA","AKIHABAR","AKIHABARA"]

if s in check:
    print("YES")
else:
    print("NO")
import sys
import math
input = sys.stdin.readline
N=int(input().rstrip())
h=list(map(int,input().rstrip().split()))

dp=[math.inf]*N
dp[0]=0

for i in range(1,N,1):
    dp[i]=min(dp[i],dp[i-1]+abs(h[i]-h[i-1]))
    if(i>1):        
        dp[i]=min(dp[i],dp[i-2]+abs(h[i]-h[i-2]))

print(dp[N-1])

### FIXED CODE ###

import sys
input = sys.stdin.readline
N=int(input().rstrip())
h=list(map(int,input().rstrip().split()))

dp=[0]*N
for i in range(N):
    dp[i]=1000000000000
dp[0]=0

for i in range(1,N,1):
    dp[i]=min(dp[i],dp[i-1]+abs(h[i]-h[i-1]))
    if(i>1):        
        dp[i]=min(dp[i],dp[i-2]+abs(h[i]-h[i-2]))

print(dp[N-1])
list = [input() for i in range (2)]
if list[1] == list[2][:-1]:
  print("Yes")
else:
    print("No")

### FIXED CODE ###

list = [input() for i in range (2)]
if list[0] == list[1][:-1]:
  print("Yes")
else:
    print("No")
n = int(input())

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

from fractions import gcd
m = max(A)
if len(A) == 1:
    print(A[0])
else:
    for i in range(n):
        for j in range(i+1, n):
            m = min(m, gcd(A[i], A[j]))
    print(m)

### FIXED CODE ###

n = int(input())

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

t = max(A)

from fractions import gcd

for i in A:
    t = gcd(t, i)
print(t)
from collections import deque
def bfs(succs, preds, start, colors):
    saisyoku = {}
    queue = deque([start])
    used = 0
    while queue:
        v = queue.popleft()
        for u in preds[v]:
            used = saisyoku[preds[v][u]]
        c = 1
        for w in succs[v]:
            if used and c == used:
                c += 1
            saisyoku[succs[v][w]] = c
            queue.append(w)
            c += 1
    return saisyoku
  
n = int(input())
vertices = range(1, n+1)
edges = [list(map(int, input().split())) for _ in range(n-1)]
jisu = {v: 0 for v in vertices}
succs = {v: {} for v in vertices}
preds = {v: {} for v in vertices}
for i, (u, v) in enumerate(edges):
  succs[u][v] = i
  preds[v][u] = i
  jisu[u] += 1
  jisu[v] += 1
colors = max(jisu.values())
print(colors)
saisyoku = bfs(succs, preds, 1)
for _, c in sorted(saisyoku.items()):
    print(c)

### FIXED CODE ###

from collections import deque
def bfs(succs, preds, start):
    saisyoku = {}
    queue = deque([start])
    used = 0
    while queue:
        v = queue.popleft()
        for u in preds[v]:
            used = saisyoku[preds[v][u]]
        c = 1
        for w in succs[v]:
            if used and c == used:
                c += 1
            saisyoku[succs[v][w]] = c
            queue.append(w)
            c += 1
    return saisyoku
  
n = int(input())
vertices = range(1, n+1)
edges = [list(map(int, input().split())) for _ in range(n-1)]
jisu = {v: 0 for v in vertices}
succs = {v: {} for v in vertices}
preds = {v: {} for v in vertices}
for i, (u, v) in enumerate(edges):
  succs[u][v] = i
  preds[v][u] = i
  jisu[u] += 1
  jisu[v] += 1
colors = max(jisu.values())
print(colors)
saisyoku = bfs(succs, preds, 1)
for _, c in sorted(saisyoku.items()):
    print(c)
input()
s = input()

x,m = 0, 0

for i in range(n):
  if s[i]=="I":
    x += 1
    m = max(x, m)
    
  if s[i]=="D":
    x -= 1
    m = max(x, m)

print(m)


### FIXED CODE ###

input()
s = input()

x,m = 0, 0

for i in range(len(s)):
  if s[i]=="I":
    x += 1
    m = max(x, m)
    
  if s[i]=="D":
    x -= 1
    m = max(x, m)

print(m)
N, M, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))

ans = 0
def dfs(a, b, k):
    global ans

    if k < 0:
        return False

    if a == N and b == M:
        return True

    if a < N and k >= A[a] and dfs(a + 1, b, k - A[a]):
        ans += 1
        return True

    if b < M and k >= B[b] and dfs(a, b + 1, k - B[b]):
        ans += 1
        return True

    return True

dfs(0, 0, K)
print(ans)

### FIXED CODE ###

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

a = [0]
for i in range(N):
    a.append(a[i] +  A[i])
b = [0]
for i in range(M):
    b.append(b[i] + B[i])

ans = 0
j = M
for i in range(N + 1):
    if a[i] > K:
        break
    while b[j] > K - a[i]:
        j -= 1
    ans = max(ans, i + j)
print(ans)
from sys import stdin
N,P=[int(x) for x in stdin.readline().rstrip().split()]
for i in reversed(range(int(pow(P,(1/N)))+1)):
    if P==1:
        ans=1
        break
    if N==1:
        ans=P
        break
    if P%i==0:
        ans=i
        break:
print(ans)

### FIXED CODE ###

import math
from sys import stdin
N,P=[int(x) for x in stdin.readline().rstrip().split()]
for i in reversed(range(round(math.pow(P,(1/N)))+1)):
    tmp=math.pow(i,N)
    if P==1:
        ans=1
        break
    if N==1:
        ans=P
        break
    if P%tmp==0:
        ans=i
        break
print(ans)
for _ in range(int(input())):
	n1,n2=map(int,input().split())
	if n1==n2:
		c+=1
		m=max(m,c)
	else:
		m=max(m,c)
		c=0
	#print(c)
if m>=3:
	print('Yes')
else:
	print('No')

### FIXED CODE ###

n=int(input())
m=0
c=0
for _ in range(n):
	n1,n2=map(int,input().split())
	if n1==n2:
		c+=1
		m=max(m,c)
	else:
		m=max(m,c)
		c=0
if m>=3:
	print('Yes')
else:
	print('No')
n = input()
i = 1
result = 0
while (i <= n):
  if (i % 3 == 0 || i % 5 == 0):
    result += i
print(result)

### FIXED CODE ###

n = int(input())
i = 1
result = 0
while (i <= n):
  if (i % 3 != 0 and i % 5 != 0):
    result += i
  i += 1
print(result)
import math
n = int(input())
A = list(map(int, input().split())).sort(reverse=True)

if len(A) <= 2:
    print(sum(A))
else:
    ans = A[0] + 2*sum(A[1:math.floor(n/2)]) + (N%2)*A[math.floor[n/2]]
    print(ans)


### FIXED CODE ###

import math
n = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)

ans = A[0] + 2*sum(A[1:math.floor(n/2)]) + (n%2)*A[math.floor(n/2)]
print(ans)
import math

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

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

for i in range(1,k+1):
  ans = combinations_count(n-k+1, i)*combinations_count(k-1, i-1)
  ans = ans%(10**9+7)
  print(ans)

### FIXED CODE ###

import math
 
def combinations_count(n, r):
  return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

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

if n == k:
  for i in range(1, k+1):
    if i == 1:
      print(1)
    else:
      print(0)
else:
  for i in range(1,k+1):
    if i <= n-k+1:
      p1 = combinations_count(n-k+1, i)
      p2 = combinations_count(k-1, i-1)
      ans = p1*p2
      ans = ans%(10**9+7)
      print(ans)
    else:
      print(0)
N,M = map(int,input().split())

#print(N,M)

num=[]
answer=[]
correct=[False] * N
correctCount = 0
wrongCount = 0
wrong=[False] * N
for k in range(M):
    n,a=input().split()
    num.append(int(n))
    answer.append(a)
    if a == "AC":
        if correct[n] == False:
            correct[n] = True
            correctCount += 1
            wrongCount += wrong[n]
    else:
        if correct[n] == False:
            wrong[n] += 1



    
#print(num)
#print(answer)
    
'''
preCorrect = False
correctCount=0
wrongCount = 0
temp_wrongCount = 0


for i in range(M):
    if i > 0 and num[i] != num[i-1]:
        if preCorrect == True:
            preCorrect = False
            temp_wrongCount = 0
        else:
            temp_wrongCount = 0
    
    
    if preCorrect == True:
        continue

    if answer[i] == "AC":
        correctCount += 1
        preCorrect = True
        wrongCount += temp_wrongCount
    if answer[i] == "WA":
        temp_wrongCount += 1
'''
print(correctCount, wrongCount)
    




### FIXED CODE ###

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

ac = [False] * N
wa = [0] * N
for _ in range(M):
    p, S = input().split()
    p = int(p) - 1
    if S == 'AC':
        ac[p] = True
    else:
        if not ac[p]:
            wa[p] += 1

a = 0
b = 0
for i in range(N):
    if ac[i]:
        a += 1
        b += wa[i]
print(*[a, b])
N = input()
if len(set(list(str(N))) <= 2:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

N = input()
if (N[0] == N[1] and N[1] == N[2]) or (N[1] == N[2] and N[2] == N[3]):
    print('Yes')
else:
    print('No')
S=list(map(int.input().split()))
T=list(map(int.input().split()))
int x=0

for S[] in T[]:
  x += 1
  
print(x)
  

### FIXED CODE ###

S=input()
T=input()
x = 0
for i in range(3):
  if S[i] == T[i]:
    x += 1
print(x)
import math

D,G = map(int,input().split())
PC = [0] + [[int(i) for i in input().split()] for _ in range(D)]

ans = 1e9
for i in range(2**D - 1):
    inSolve = -1
    score_tmp = 0
    solved = 0
    for j in range(D):
        if (i>>j)%2 == 1:
            score_tmp += (j+1)*100*PC[j][0]+PC[j][1]
            solved += PC[j][0]
        else:
            inSolve = max(j,inSolve)
    if score_tmp < G and inSolve != -1:
        if math.ceil((G-score_tmp)/((inSolve+1)*100)) <= PC[inSolve][0]:
            ans = min(ans,solved + math.ceil((G-score_tmp)/((inSolve+1)*100)))
    elif score_tmp >= G:
        ans = min(ans,solved)
print(ans)

### FIXED CODE ###

import math
D,G = map(int,input().split())
p=[]
c=[]
for i in range(D):
    p_tmp,c_tmp = map(int,input().split())
    p.append(p_tmp)
    c.append(c_tmp)

ans = sum(p)
for i in range(2**D):
    score_tmp = 0
    ans_tmp = 0
    for j in range(D):
        if (i>>j)%2 == 1:
            score_tmp += p[j]*(j+1)*100+c[j]
            ans_tmp += p[j]

    if ans_tmp >= ans:
        continue
    elif score_tmp >= G:
        ans = ans_tmp
        continue
    else:
        for j in range(D):
            if (i>>(D-1-j))%2 == 1:
                continue
            elif score_tmp + p[D-1-j]*(D-j)*100 < G:
                break
            else:
                ans_tmp += math.ceil((G - score_tmp)/((D-j)*100))
                ans = min(ans,ans_tmp)
                break

print(ans)
import sys
from string import ascii_lowercase as alph
from itertools import zip_longest

s,t=[list(l) for l in sys.stdin.read().split()]
d=dict((w,x) for w,x in zip(alph,range(26)))
d['?']=-1
s.sort(key=d.get)
t.sort(key=d.get, reverse=True)
for x,y in zip_longest(s,t,fillvalue='?'):
  if d[x]<d[y]:
      print('Yes')
      break
  elif d[x]>d[y]
      print('No')
      break
else:
  print('No')


### FIXED CODE ###

import sys
from string import ascii_lowercase as alph
from itertools import zip_longest

s,t=[list(l) for l in sys.stdin.read().split()]
d=dict((w,x) for w,x in zip(alph,range(26)))
d['?']=-1
s.sort(key=d.get)
t.sort(key=d.get, reverse=True)
for x,y in zip_longest(s,t,fillvalue='?'):
  if d[x]<d[y]:
      print('Yes')
      break
  elif d[x]>d[y]:
      print('No')
      break
else:
  print('No')
print(type(int(input()))**3)

### FIXED CODE ###

num = int(input())
number = num **3
print(number)
import math
from functools import reduce
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
A,B=list(map(int,input().split()))
print(lcm(A,B))

### FIXED CODE ###

import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

A,B=list(map(int,input().split()))
print(lcm_list([A,B]))
list = ['ABC','ARC']
if s == 'ABC':
	print(list[1])
else:
  print(list[0])

### FIXED CODE ###

s = input()
if s == 'ABC':
	print('ARC')
else:
  print('ABC')
read = lambda: sys.stdin.readline().rstrip()
s1 = read()
s2 = read()
if s1[0] == s2[2] and s1[1] == s2[1] and s1[2] == s2[0]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

import sys
read = lambda: sys.stdin.readline().rstrip()
s1 = read()
s2 = read()
if s1[0] == s2[2] and s1[1] == s2[1] and s1[2] == s2[0]:
  print("YES")
else:
  print("NO")
S = input()
mod2019 = [0]*(len(S)+1)

for i in range(len(S)):
    mod2019[i] = int(S[i:len(S)-1])%2019

answer = 0
count = [0 for _ in range(2020)]


for i in range(len(S)):
    answer += count[mod2019[i]]
    count[mod2019[i]] += 1
print(answer)

### FIXED CODE ###

S = input()
mod2019 = [0]*len(S)

mod2019[-1] = int(S[-1])
keta_mod = 1
for i in range(len(S)-2,-1,-1):
    keta_mod = (keta_mod*10)%2019
    mod2019[i] = (mod2019[i+1] + int(S[i])*keta_mod)%2019

mod2019.extend([0])

answer = 0
count = [0 for _ in range(2020)]

for i in range(len(S)+1):
    answer += count[mod2019[i]]
    count[mod2019[i]] += 1
print(answer)
A,B,N = (int(i) for i in input().split())
max_num = -10**100
tmp_num = 0
cnt = 1
flg = False
while flg  == False:
  tmp_num = math.floor(A*cnt/B) - A*math.floor(cnt/B)
  #print(tmp_num)
  if tmp_num > max_num :
    max_num = tmp_num
    cnt += 1
  else:
    flg = True
print(max_num)

### FIXED CODE ###

a, b, n = map(int, input().split())
if n >= b - 1:
    print(int(a - a / b))
else:
    print(int(a * n / b) - a * int(n / b))
n=int(input())
I=list(map(int,input().split()))
num=1000
for i in range(n-1):
    if I[i]<I[i+1]:
        p=num//I[i])
        num-=p*I[i]
        num+=p*I[i+1]

print(num)


### FIXED CODE ###

n=int(input())
I=list(map(int,input().split()))
num=1000
for i in range(n-1):
    if I[i]<I[i+1]:
        p=num//I[i]
        num-=p*I[i]
        num+=p*I[i+1]

print(num)
print(input()%9)

### FIXED CODE ###

input_number = int(input())
hundred = int(input_number / 100)
ten = int((input_number - hundred * 100) / 10)
one = int((input_number -(hundred * 100 + ten * 10) /1))
print(hundred + ten + one)
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = sorted(c)
result = 0
for i in range(3):
    result += d[i]

print(result)

### FIXED CODE ###

a, b = map(int, input().split())
c = list(map(int, input().split()))
d = sorted(c)
result = 0
for i in range(b):
    result += d[i]

print(result)
n = int(input())
l = list(map(int,input(). split ()))
 
a = 1
for i in l:
	a *= i
	if a > 1e18:
		a = -1
		break
print(a)

### FIXED CODE ###

A, B = map(int, input().split())
print(A * B)
n = int(input())
n_list = [int(i) for i in input().split(" ")]
mini = min(n_list)
maxi = max(n_list)
total = sum(n_list)

print('{0} {1} {2}'.format(mini, maxi, total)

### FIXED CODE ###

n = int(input())
n_list = [int(i) for i in input().split(" ")]
mini = min(n_list)
maxi = max(n_list)
total = sum(n_list)

print('{0} {1} {2}'.format(mini, maxi, total))