Harryxun/stf_run huggingface dataset:
n, k, q = map(int, input().split())
score = [0] * n
for _ in range(q):
    i = int(input())
    score[i-1] += 1
for j in score:
    if score[j] > q - k:
        print('Yes')
    else:
        print('No')


### FIXED CODE ###

n, k, q = map(int, input().split())
score = [0] * n
for _ in range(q):
    i = int(input())
    score[i-1] += 1
for j in range(len(score)):
    if score[j] > q - k:
        print('Yes')
    else:
        print('No')
h, w = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(h)]

res = []
for i in range(h):
    if i % 2 == 0:
        for j in range(w):
            if a[i][j] % 2 == 1:
                if j < w - 1:
                    a[i][j+1] += 1
                    res.append([i+1, j+1, i+1, j+2])
                else:
                    a[i+1][j] += 1
                    res.append([i+1, j+1, i+2, j+1])
    else:
        for j in range(w-1, -1, -1):
            if a[i][j] % 2 == 1:
                if j > 0:
                    a[i][j-1] += 1
                    res.append([i+1, j+1, i+1, j])
                else:
                    a[i+1][j] += 1
                    res.append([i+1, j+1, i+2, j+1])

print(len(res))
for y1, x1, y2, x2 in res:
    print(y1, x1, y2, x2)

### FIXED CODE ###

h, w = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(h)]

cnt = 0
for i in range(h):
    for j in range(w):
        if a[i][j] % 2 == 1:
            cnt += 1

res = []
c = 0
move_flag = False
for i in range(h):
    if i % 2 == 0:
        for j in range(w):
            if a[i][j] % 2 == 1:
                c += 1
                if move_flag:
                    move_flag = False
                else:
                    if cnt % 2 == 0 or c != cnt:
                        move_flag = True
            if move_flag:
                if j < w - 1:
                    res.append([i+1, j+1, i+1, j+2])
                else:
                    res.append([i+1, j+1, i+2, j+1])
    else:
        for j in range(w-1, -1, -1):
            if a[i][j] % 2 == 1:
                c += 1
                if move_flag:
                    move_flag = False
                else:
                    if cnt % 2 == 0 or c != cnt:
                        move_flag = True
            if move_flag:
                if j > 0:
                    res.append([i+1, j+1, i+1, j])
                else:
                    res.append([i+1, j+1, i+2, j+1])

print(len(res))
for y1, x1, y2, x2 in res:
    print(y1, x1, y2, x2)
import math
import numpy as np

def main():
  N,M = (int(x) for x in input().split())
  A = [int(x) for x in input().split(M)]
  
  for i in range(M):
    N = N - A[i]
  
  if N < 0:
    print('-1')
  else:
    print(N)  
  
if __name__ == '__main__':
  main()

### FIXED CODE ###

import math
import numpy as np

def main():
  N,M = (int(x) for x in input().split())
  A = [int(x) for x in input().split()]
  
  for i in range(M):
    N = N - A[i]
  
  if N < 0:
    print('-1')
  else:
    print(N)  
  
if __name__ == '__main__':
  main()
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

A, B, N = LI()
ans = math.floor(A * N / B)
if N > B:
    ans = max(ans, math.floot(A * (B - 1) / B))
print(ans)





### FIXED CODE ###

# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

A, B, N = LI()
if N < B:
    ans = math.floor(A * N / B)
elif N >= B:
    ans = math.floor(A * (B - 1) / B)
print(ans)
n,k=map(int,input().split())
print(min(n%k,k%n))

### FIXED CODE ###

n,k=map(int,input().split())
if not n or k == 1:
	print(0)
else:
	if n >= k:
		n = n%k
	print(min(n,k-n))
#include <bits/stdc++.h>
using namespace std;

int main(void){
    int N;
    int count = 0;
    cin >> N;
    cout << (int)(((N-1)*(1 + N-1))/2) << endl;
    return 0;
}

### FIXED CODE ###

N = int(input())
print((N-1)*(1 + N-1) // 2)
N = int(input())
X = input()
X = X[::-1]

def count(n):
    if n==0:
        return 0
    m = 0
    for i in range(18):
        if n&2**i:
            m += 1
    n %= m
    return 1+count(n)



p1 = [1]*(N+1)
p2 = [1]*(N+1)
m = 0
for i in range(N):
    if X[i]=='1':
        m += 1
for n in range(N):
    p1[n+1] = 2*p1[n]%(m+1)
    p2[n+1] = 2*p2[n]%(m-1)

num = [0]*N
base1 = 0
base2 = 0
for i in range(N):
    if X[i]=='1':
        base1 += p1[i]
        base2 += p2[i]

for i in range(N):
    if X[i]=='0':
        num[i] = (base1+p1[i])%(m+1)
    else:
        num[i] = (base2-p2[i])%(m-1)

ans = [1]*N

for i in range(N-1,-1,-1):
    ans[i] += count(num[i])
    print(ans[i])

### FIXED CODE ###

N = int(input())
X = input()
X = X[::-1]

def count(n):
    if n==0:
        return 0
    m = 0
    for i in range(18):
        if n&2**i:
            m += 1
    n %= m
    return 1+count(n)



p1 = [1]*(N+1)
p2 = [1]*(N+1)
m = 0
for i in range(N):
    if X[i]=='1':
        m += 1

for n in range(N):
    p1[n+1] = 2*p1[n]%(m+1)
    if m!=1:
        p2[n+1] = 2*p2[n]%(m-1)

num = [0]*N
base1 = 0
base2 = 0
for i in range(N):
    if X[i]=='1':
        base1 += p1[i]
        base2 += p2[i]

ans = [0]*N
for i in range(N):
    if X[i]=='0':
        num[i] = (base1+p1[i])%(m+1)
        ans[i] += 1
    else:
        if m!=1:
            num[i] = (base2-p2[i])%(m-1)
            ans[i] += 1
        else:
            num[i] = 0



for i in range(N-1,-1,-1):
    ans[i] += count(num[i])
    print(ans[i])
n = input()

print(n.translate(str.maketrans({"1":"9"}))


### FIXED CODE ###

n = input()

print(n.replace("1","x").replace("9","1").replace("x","9"))
#炎の3段lambda
n = int(input())
li = [list(map(str, input().split())) for i in range(n)]
[li[i].append(str(i+1)) for i in range(n)]
li = sorted(li, key=lambda x:x[0])
rest = []
ans = []
for j in range(n-1):
    if li[j][0] == li[j+1][0]:
        rest.append(li[j])

    else:
        rest.append(li[j])
        ans.append(sorted(rest, key=lambda x:x[1], reverse = True))
        rest = []
rest.append(li[j+1])
ans.append(sorted(rest, key=lambda x:x[1], reverse = True))
ans = [flatten for inner in ans for flatten in inner]
for k in range(n):
    print(int(ans[k][2]))

### FIXED CODE ###

n = int(input())
a = [input().split() +[i+1] for i in range(n)]
a = sorted(a ,key=lambda x:(x[0], -int(x[1])))
for i in range(len(a)):
    print(a[i][2])
n = int(input())
 
l = [2,1]
for i in range(2,n+1):
  l.append(l[i-1] + l[i-2])
 
print(l[i])

### FIXED CODE ###

n = int(input())
 
l = [2,1]
for i in range(2,n+1):
  l.append(l[i-1] + l[i-2])
 
print(l[n])
I=lambda:map(int,input())
n,k=I()
s=1001
for i in range(n):
  a,b=I()
  if b<=k:
    s=min(s,a)
if s==1001:
  print('TLE')
else:
  print(s)

### FIXED CODE ###

I=lambda:map(int,input().split())
n,k=I()
s=1001
for i in range(n):
  a,b=I()
  if b<=k:
    s=min(s,a)
if s==1001:
  print('TLE')
else:
  print(s)
a,b=map(int,input().split())
import fractions
x=fractions.gcd(a,b)
print(a＊b/x)

### FIXED CODE ###

a,b=map(int,input().split())
import fractions
x=fractions.gcd(a,b)
print(a*b//x)
import bisect
from collections import deque

n=int(input())

ans=[0]

for i in range(2**20):
  ch=0
  for j in range(20):
    
    if (i>>j)&1:
      ch+=2**(j*2)
  ans.append(ch)
  
ans1=[]
for x in range(2**20):
  ch1=0
  for y in range(20):
    if (x>>y)&1:
      ch1+=(-2)**(y*2+1)
  ans1.append(ch1)
  

for a in ans1:
  if n-a>=0:
    d=bisect.bisect_right(ans,n-a)
    if ans[d-1]==n-a:
      ans_min=a
      ans_plus=ans[d-1]
      break
      
v=1
C=0
while v<=ans_plus:
  v*=4
  C+=2
C-=2
pl_list=[]
while C>-1:
  if ans_plus>=2**C:
    pl_list.append(1)
    ans_plus-=2**C
    C-=2
  else:
    pl_list.append(0)
    C-=2
w=-2
D=1

while ans_min<=w:
  w*=4
  D+=2
D-=2

mi_list=[]
while D>0:
  if ans_min<=(-2)**D:
    mi_list.append(1)
    ans_min-=(-2)**D
    D-=2
  else:
    mi_list.append(0)
    D-=2

ans_str=[]
P=deque(pl_list)
M=deque(mi_list)

while P or M:
  if P:
    x=P.pop()
  else:
    x=0
  if M:
    y=M.pop()
  else:
    y=0
  ans_str.append(str(x))
  ans_str.append(str(y))

ans_str_r=list(reversed(ans_str))
if ans_str_r[0]=='0':
  ans_str_r.remove('0')
  
print(''.join(ans_str_r))

### FIXED CODE ###

import bisect
from collections import deque

n=int(input())

ans=[0]

for i in range(2**20):
  ch=0
  for j in range(20):
    
    if (i>>j)&1:
      ch+=2**(j*2)
  ans.append(ch)
  
ans1=[]
for x in range(2**20):
  ch1=0
  for y in range(20):
    if (x>>y)&1:
      ch1+=(-2)**(y*2+1)
  ans1.append(ch1)
  

for a in ans1:
  if n-a>=0:
    d=bisect.bisect_right(ans,n-a)
    if ans[d-1]==n-a:
      ans_min=a
      ans_plus=ans[d-1]
      break
      
v=1
C=0
while v<=ans_plus:
  v*=4
  C+=2
C-=2
pl_list=[]
while C>-1:
  if ans_plus>=2**C:
    pl_list.append(1)
    ans_plus-=2**C
    C-=2
  else:
    pl_list.append(0)
    C-=2
w=-2
D=1

while ans_min<=w:
  w*=4
  D+=2
D-=2

mi_list=[]
while D>0:
  if ans_min<=(-2)**D:
    mi_list.append(1)
    ans_min-=(-2)**D
    D-=2
  else:
    mi_list.append(0)
    D-=2

ans_str=[]
P=deque(pl_list)
M=deque(mi_list)

while P or M:
  if P:
    x=P.pop()
  else:
    x=0
  if M:
    y=M.pop()
  else:
    y=0
  ans_str.append(str(x))
  ans_str.append(str(y))

ans_str_r=list(reversed(ans_str))
if len(ans_str_r)>1:
  if ans_str_r[0]=='0':
    ans_str_r.remove('0')
  
if n!=0:
  print(''.join(ans_str_r))
else:
  print(0)
def find (x) : 
    fa[x] = x if fa[x] == x else find (fa[x])
    return fa[x]

def union (x, y) :
    fa[find (x)] = find (y)
    
N, M, K = list (map (int, input().split()))

fa = [x for x in range (N + 1)]
ans = [-1 for i in range (N + 1)]
siz = [0 for i in range (N + 1)]

for i in range (M) :
    a, b = list (map (int, input().split()))
    union (a, b)
    ans[a] -= 1
    ans[b] -= 1
    
for i in range (1, N + 1) :
    siz[find(i)] += 1

for i in range (1, N + 1) :
    ans[i] += siz[find (i)]

for i in range (K) :
    c, d = list (map (int, input().split()))
    if (find (c) == find (d)) :
        ans[c] -= 1
        ans[d] -= 1

print (' '.join (list (map(str , ans[1 : N + 1]))))


### FIXED CODE ###

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

fa = [x for x in range (n + 1)]
siz = [1 for i in range (n + 1)]
dep = [0 for i in range (n + 1)]
e = [1 for i in range (n + 1)]

def find (x) :
    if (fa[x] == x) :
        return x
    fa[x] = find (fa[x])
    return fa[x]

def uni (x, y) :
    u, v = find (x), find (y)
    if (dep[u] >= dep[v]) :
        fa[v] = u
        if (u != v) :
            siz[u] += siz[v]
        if (dep[u] == dep[v]) :
            dep[u] += 1
    else :
        fa[u] = v
        if (u != v) :
            siz[v] += siz[u]

for i in range (m) :
    a, b = list (map (int, input ().split ()))
    uni (a, b)
    e[a] += 1
    e[b] += 1

for i in range (1, n + 1) :
    siz[i] = siz[find (i)]

for i in range (k) :
    c, d = list (map (int, input ().split ()))
    if (find (c) == find (d)) :
        siz[c] -= 1
        siz[d] -= 1

siz = [siz[i] - e[i] for i in range (1, n + 1)]

print (' '.join (list (map (str, siz))))
a,b = int(input())
print(a*b)
print((a+b)*2)

### FIXED CODE ###

a,b = [int(i) for i in input().split()]
print(a*b,a*2+b*2)
a=input()

al=[int(c) for c in list(str(a))]

sal=sum(al)
return sal if sal > 1 else 10

### FIXED CODE ###

a=input()

al=[int(c) for c in list(str(a))]

sal=sum(al)
ret= sal if sal > 1 else 10
print(ret)
s = input().split()
if s.count(“5”) == 2 and s.count(“7”) == 1 :
    print(“YES”)
else :
    print(“NO”)

### FIXED CODE ###


s = input().split()
if s.count("5") == 2 and s.count("7") == 1:
    print("YES")
else:
    print("NO")
import itertools as it
# -*- coding: utf-8 -*-
# 個数の入力
N = int(input())
# 改行区切りの名前の入力
S = []
for i in range(N):
    S.append(input())
# データの加工
for i in range(N):
	S[i] = S[i][0]

# 文字列カウント
count = [S.count('M'), S.count('A'), S.count('R'), S.count('C'), S.count('H')]

# 数え上げ
answer = count[0]*count[1]*count[2]
answer = count[0]*count[1]*count[3] + answer
answer = count[0]*count[1]*count[4] + answer
answer = count[0]*count[2]*count[3] + answer
answer = count[0]*count[2]*count[4] + answer
answer = count[0]*count[3]*count[4] + answer
answer = count[1]*count[2]*count[3] + answer
answer = count[1]*count[2]*count[4] + answer
answer = count[1]*count[3]*count[4] + answer
answer = count[2]*count[3]*count[4] + answer

# 出力
print(answer)

### FIXED CODE ###

# -*- coding: utf-8 -*-
# 整数の入力
N = int(input())
# グループ数の計算
g = N // 3
# 出力
print("{}".format(g))
from heapq import heappush, heappop


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

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

ans = 0
for back in range(K + 1):
    for l in range(K - back + 1):
        r = K - back - l
        S = 0
        hq = []
        for i in range(l):
            heappush(hq, V[i])
            S += V[i]
        for j in range(r):
            heappush(hq, V[N - 1 - j])
            S += V[N - 1 - j]
        for k in range(back):
            if len(hq) > 0:
                if hq[0] < 0:
                    S -= heappop(hq)

        ans = max(ans, S)

print(ans)


### FIXED CODE ###

from heapq import heappush, heappop


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

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

ans = 0
for back in range(K + 1):
    getV = min(N, K - back)
    for left in range(getV + 1):
        r = getV - left
        S = 0
        hq = []
        for i in range(left):
            heappush(hq, V[i])
            S += V[i]
        for j in range(r):
            heappush(hq, V[N - 1 - j])
            S += V[N - 1 - j]
        for k in range(back):
            if len(hq) > 0 and hq[0] < 0:
                S -= heappop(hq)

        ans = max(ans, S)

print(ans)
from collections import defaultdict

N = int(input())

D = defaultdict(list) 
S = defaultdict(lambda: -1) #STEPD
R = defaultdict(int) #ROOT
for i in range(N-1):
    u,v,w = map(int,input().split())
    D[u].append(v)
    D[v].append(u)
    R["{}-{}".format(u,v)] = w
    
T = [(1,0)]
S[n] = 0
while T:
    n,w = T.pop()
    for d in D[n]:
        wr = R["{}-{}".format(n,d)]
        if S[d]>=0:continue
        else: S[d] = (w+wr)%2
        T.append((d,(w+wr)%2))
        
for k in sorted(S.keys()):
    print(S[k])

### FIXED CODE ###

from collections import defaultdict

N = int(input())

D = defaultdict(list) 
S = {} #STEPD
for i in range(1,N+1):S[i] = -1
R = defaultdict(int) #ROOT
for i in range(N-1):
    u,v,w = map(int,input().split())
    D[u].append(v)
    D[v].append(u)
    R["{}-{}".format(u,v)] = w
    R["{}-{}".format(v,u)] = w
    
T = [(1,0)]
S[1] = 0
while T:
    n,w = T.pop()
    for d in D[n]:
        wr = R["{}-{}".format(n,d)]
        if S[d]>=0:continue
        else: S[d] = (w+wr)%2
        T.append((d,(w+wr)%2))
        
for k in range(1,N+1):
    print(S[k] if S[k]>=0 else 0)
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IS(): return str(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")

A, B = int(input())

print(A*B)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IS(): return str(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")

A = LI()

print(A[0]*A[1])
import math
import decimal
def main():
    a, b = map(int, input().split())
    decimal.getcontext().prec = int(math.log10(a)) + 1
    print(int(decimal.Decimal(a)/decimal.Decimal(b)))


main()


### FIXED CODE ###

import decimal
def main():
    a, b = map(int, input().split())
    decimal.getcontext().prec = len(str(a))
    print(int(decimal.Decimal(a)/decimal.Decimal(b)))


main()
a = list(map(int, input().split()))
if a[0] == 1 or a[0] == 0:
  a[0] = 1
  return a[0]
else: 
  return a[0]*(a[0] - 1)/2
if a[1] == 1 or a[1] == 0:
  a[1] = 1
  return a[1] 
else: 
  return a[1]*(a[1] - 1)/2
print(a[0]*a[1])


### FIXED CODE ###

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


def a1():
    if a[0] == 1 or a[0] == 0:
        a[0] = 0
        return a[0]
    else:
        return a[0] * (a[0] - 1) / 2


def b1():
    if a[1] == 1 or a[1] == 0:
        a[1] = 0
        return a[1]
    else:
        return a[1] * (a[1] - 1) / 2


print(int(a1() + b1()))
first = 0;
second = 0;
third = 0;
for var in range(0,10):
	N = input()
	if N>first:
		third = second
		second = first
		first = N
	elif N>second:
		third = second
		second = N
	elif N>third:
		third = N
print (first)
print (second)
print (third)


### FIXED CODE ###

first = 0;
second = 0;
third = 0;
for var in range(0,10):
	N = int(input())
	if (N>first):
		third = second
		second = first
		first = N
	elif (N>second):
		third = second
		second = N
	elif (N>third):
		third = N
print (first)
print (second)
print (third)
n=int(input())
l=list(map(int,input().split()))
l.sort(reverse=True)
alice,bob=[],[]
for i in range(1,n+1):
    if i%2==1: alice.append(l[i])
    elif i%2==0: bob.append(l[i])
print(sum(alice)-sum(bob))

### FIXED CODE ###

n=int(input())
l=list(map(int,input().split()))
l.sort(reverse=True)
alice,bob=[],[]
for i in range(1,n+1):
    if i%2==1: alice.append(l[i-1])
    elif i%2==0: bob.append(l[i-1])
print(sum(alice)-sum(bob))
N = int(input())
A = list(map(int, input.split()))
alice, bob = 0, 0

for i in range(N):
    m = max(A)
    A.remove(m)
    if i % 2 == 0:
        alice += m
    else:
        bob += m
print(alice - bob)



### FIXED CODE ###

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

for i in range(N):
    m = max(A)
    A.remove(m)
    if i % 2 == 0:
        alice += m
    else:
        bob += m
print(alice - bob)
from collections import deque

N,M,K = map(int,input().split())
Ali = list(map(int,input().split()))
Bli = list(map(int,input().split()))

q = deque()
q.append([0,0,0])#(time,a,b)
r = 0
k = 0

while len(q) > 0:
  time,a,b = q.popleft()
  
  r = max(r,a+b)
    
  
  if a<N:
    if k == [a+1,b]:
      continue
    if Ali[a] <= K-time:
      q.append([time+Ali[a],a+1,b])
    
  if b<M:
    if Bli[b] <= K-time:
      q.append([time+Bli[b],a,b+1])
    
  k = [a,b+1]
    
print(r)

### FIXED CODE ###

def dt(n):
  table = [0] * (n + 1)
  r = 0
    
  for i in range(1, n + 1):
    for j in range(i, n + 1, i):
      table[j] += 1
    
  for i in range(1,n+1):
    r += i*table[i]
    
  return r

N = int(input())
print(dt(N))
n = int(input())
x, y = 0, 0
for i in range(1, int(n**0.5)):
        if n%i==0: x = i
y = n//x
print(x+y-2)

### FIXED CODE ###

n = int(input())
l = int(n**0.5)
while l:
    if n%l: l-=1
    else: break
print((l-1)+(n//l-1))
import bisect
import copy
import heapq
import sys
import itertools
import math
import queue
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
mod = 10 ** 9 + 7

def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for n in range(N)]
def init_dp1(init, N): return [init for _ in range(N)]
def init_dp2(init, N, M): return [[init for _ in range(M)] for _ in range(N)]


class V:
    def __init__(self, f, v=None):
        self.f = f
        self.v = v
 
    def __str__(self):
        return str(self.v)
 
    def ud(self, n):
        if n is None:
            return

        if self.v is None:
            self.v = n
            return
        self.v = self.f(self.v, n) 


def main():
    X = int(input())
    for B in range(501):
        A5 = X + B ** 5
        A = int(A5 ** 0.2)
        if A ** 5 == A5:
            print(A, B)
            return 

        A5 = X - B ** 5
        A = int(A5 ** 0.2)
        if A ** 5 == A5:
            print(A, -B)
            return 

    print(-1)

if __name__ == "__main__":
    main()


### FIXED CODE ###

import bisect
import copy
import heapq
import sys
import itertools
import math
import queue
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
mod = 10 ** 9 + 7

def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for n in range(N)]
def init_dp1(init, N): return [init for _ in range(N)]
def init_dp2(init, N, M): return [[init for _ in range(M)] for _ in range(N)]


class V:
    def __init__(self, f, v=None):
        self.f = f
        self.v = v
 
    def __str__(self):
        return str(self.v)
 
    def ud(self, n):
        if n is None:
            return

        if self.v is None:
            self.v = n
            return
        self.v = self.f(self.v, n) 


def main():
    X = int(input())
    for B in range(1001):
        A5 = X + B ** 5
        A = int(A5 ** 0.2) if A5 > 0 else int((-A5) ** 0.2) * -1
        if A ** 5 == A5:
            print(A, B)
            return 

        A5 = X - B ** 5
        A = int(A5 ** 0.2) if A5 > 0 else int((-A5) ** 0.2) * -1
        if A ** 5 == A5:
            print(A, -B)
            return 

    print(-1)

if __name__ == "__main__":
    main()
import numpy
N, M = map(int, input().split())
dic = numpy.zeros([N,N], dtype = int)
for m in range(M):
    x, y = map(int, input().split())
    dic[x-1][y-1] = 1
mat = numpy.matrix(dic, int)
memo = numpy.zeros([N+1, N], dtype = int)
memo[0] = 1
z = numpy.zeros([N], int)
ans = 0
for n in range(N):
    memo[n+1] = numpy.dot(mat,(memo[n].reshape(-1,1))).reshape(N)
    if memo[n+1].any() == 0:
        if ans == 0:
            ans = n
            print(ans)

### FIXED CODE ###

import sys
 
sys.setrecursionlimit(100000)
 
N, M = map(int, input().split(" "))
G = [[] for _ in range(N)]
 
for _ in range(M):
    x, y = map(int, input().split(" "))
    G[x-1].append(y-1)
dp = [-1] * N
def pathlen(G, dp, v):
    if dp[v] != -1:
        return dp[v]
 
    plen = 0
    for i in G[v]:
        plen = max(plen, pathlen(G, dp, i)+1)
    dp[v] = plen
    return plen
ans = 0
for i in range(N):
    ans = max(ans, pathlen(G, dp, i))
print(ans)
import math
A, B = map(int, input().split())
print((A*B)//math.gcd(A, B))

### FIXED CODE ###

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
A, B = map(int, input().split())
print(A*B//gcd(A, B))
alphabet = {0:"a",1:"b",2:"c",3:"d",4:"e",5:"f",6:"g",7:"h",8:"i",9:"j",10:"k",11:"l",12:"m",13:"n",14:"o",15:"p",16:"q",17:"r",18:"s",19:"t",20:"u",21:"v",22:"w",23:"x",24:"y",25:"z"}
N = int(input())
name = ""
while N != 0:
     index= int(N%26)
     name += alphabet[index-1]
     N = int(N/26)
print(name[::-1])


### FIXED CODE ###

alphabet = {0:"a",1:"b",2:"c",3:"d",4:"e",5:"f",6:"g",7:"h",8:"i",9:"j",10:"k",11:"l",12:"m",13:"n",14:"o",15:"p",16:"q",17:"r",18:"s",19:"t",20:"u",21:"v",22:"w",23:"x",24:"y",25:"z"}
N = int(input())
name = ""
while N != 0:
     index= int(N%26)
     if index == 0:
         name += alphabet[25]
     else:
         name += alphabet[index-1]
     N = int((N-1)/26)
print(name[::-1])