peterverebics/CodeNet_Python_118 huggingface dataset:
n,m=map(int,input().split())
arr=[int(i) for i in input().split()]
hashmap=dict()
count=dict()
for key in range(1,n+1):
  hashmap[key]=arr[key-1]
  count[key]=0

result=0
for i in range(m):
  a,b=map(int,input().split())
  if hashmap[a]<hashmap[b]:
    count[a]+=1
  else:
    count[b]+=1  

for i in range(1,n+1):
  if count[i]==0:
    result+=1
    
print(result)
N,M=map(int,input().split())
H=list(map(int,input().split()))
n=[1 for i in range(N)]
for i in range(M):
    A,B=map(int,input().split())
    if H[A-1]>H[B-1]:
        n[B-1]=0
    if H[A-1]<H[B-1]:
        n[A-1]=0
    else:
        n[A-1],n[B-1]=0,0
print(sum(n))
N, M = map(int, input().split())
H = input().split()
ans = [1] * N

# print(H)
for i in range(M):
    a, b = map(int, input().split())
    AH = H[a - 1]
    BH = H[b - 1]
    if AH >= BH:
        ans[b - 1] = 0
    elif BH >= AH:
        ans[a - 1] = 0


print(ans.count(1))
n, m = map(int, input().split())
h = list(map(int, input().split()))
g = [[] for _ in range(n+1)]
for i in range(m):
    a, b = map(int, input().split())
    g[a].append(b)
    g[b].append(a)

cnt = 0
for i in range(1, n+1):
    if len(g[i]) == 0:
        continue
    for j in g[i]:
        print(i, j)
        print(h[j-1], h[i-1])
        if h[j-1] >= h[i-1]:
            break
    else:
        cnt += 1

print(cnt)
N, M = map(int, input().split())
H = [int(i) for i in input().split()]
G = [0]*N
L = [1]*N

for i in range(M):
    A, B = map(int, input().split())
    L[A-1] = 0
    L[B-1] = 0

    if H[A-1]>H[B-1]: G[A-1] = 1
    elif H[A-1]<H[B-1]: G[B-1] = 1
    elif H[A-1]==H[B-1]:
        G[A-1] = 1
        G[B-1] = 1

# print(L)
# print(G)
print(G.count(1)+L.count(1))
N,M=map(int,input().split())
H=list(map(int,input().split()))
AB=[]
for i in range(M):
    AB.append(list(map(int,input().split())))

J=[0]*N
for i in range(M):
    if H[AB[i][0]-1]<H[AB[i][1]-1]:
        J[AB[i][0]-1]+=1
    else:
        J[AB[i][1]-1]+=1
c=0
for i in J:
    if i == 0:
        c+=1

print(c)
n, m = map(int,input().split())
H  = list(map(int,input().split()))
A_B = [list(map(int,input().split())) for i in range(m)]
s = set()
for i in A_B:
    if H[i[0]-1] <= H[i[1]-1]:
        s.add(i[0])
    else:
        s.add(i[1])

print(n-len(s))
n,m = map(int,input().split())
h = list(map(int,input().split()))
l = [list(map(int,input().split())) for i in range(m)]
a,b = [list(i) for i in zip(*l)]
z = [1] * n

for i in range(m):
    x = a[i] - 1
    y = b[i] - 1
    if h[x] < h[y]:
        z[x] = 0
    else:
        z[y] = 0

print(z)
print(n - z.count(0))
N,M=map(int,input().split())
H=list(map(int,input().split()))
a,ans=[],[]
for _ in range(M):
    a.append(list(map(int,input().split())))
for i in range(M):
    if H[(a[i][0])-1]>H[(a[i][1])-1]:
        ans.append(a[i][0])
    elif H[(a[i][0])-1]<H[(a[i][1])-1]:
        ans.append(a[i][1])
print(len(ans))
n,m = map(int,input().split())
h_list = list(map(int,input().split()))
n_list = [1]*n
for i in range(m):
    a,b = map(int,input().split())
    if h_list[a-1] > h_list[b-1]:
        n_list[b-1] = 0
    elif h_list[a-1] < h_list[b-1]:
        n_list[b-1] = 0
    else:
        n_list[b-1] = 0
        n_list[b-1] = 0
count = 0
for i in n_list:
    if i == 1:
        count += 1
print(count)
import sys
input = sys.stdin.readline

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

# 展望台から行ける展望台の高さを格納しておく
from collections import defaultdict
d = defaultdict(int)
for i in range(M):
  A,B = list(map(int,input().split()))
  A -= 1
  B -= 1
  if d[A] < H[B]:
    d[A] = H[B]
  if d[B] < H[A]:
    d[B] = H[A]
cnt = 0
for idx,h in enumerate(H):
  if d[idx] == 0 or h < d[idx]:
    cnt += 1
else:
  print(cnt)
n,m = list(map(int,input().split()))
h = list(map(int,input().split()))
e = [[] for _ in range(n)]
c = [[] for _ in range(n)]
for i in range(m):
    a,b = list(map(int,input().split()))
    a -= 1
    b -= 1
    e[a].append(b)
    e[b].append(a)
ans = 0
for i in range(n):
    f = h[i]
    for j in range(len(e[i])):
        t = h[e[i][j]]
        if h[i] == t:
            t += 1
        f = max([h[i],t])
    if f == h[i]:
        ans += 1
print(ans)
N, M = list(map(int, input().split()))
H = list(map(int, input().split()))
ans = [1]*N
for i in range(M):
    A, B = list(map(int, input().split()))
    if A > B:
        ans[B-1] = 0
    else:
        ans[A-1] = 0
print(sum(ans))
N, M = map(int, input().split())
H = list(map(int, input().split()))

AA = []
for i in range(M):
    AA.append(list(map(int, input().split())))

ZZ = [True for i in range(N)]

for aa in AA:
    n0 = aa[0] - 1
    n1 = aa[1] - 1
    if (H[n0] < H[n1]):
        ZZ[n0] = False
    else:
        ZZ[n1] = False
ans = 0
for z in ZZ:
    if (z == True):
        ans += 1
print(ans)
n,m = map(int,input().split())
h = list(map(int,input().split()))
target = [0 for _ in range(n)]
win = [0 for _ in range(n)]
for i in range(m):
    a,b = map(int,input().split())
    target[a-1] += 1
    target[b-1] += 1
    if a > b:
        win[a-1] += 1
    elif b > a:
        win[b-1] += 1

count = 0
for j in range(n):
    if target[j] == win[j]:
        count += 1

print(count)
N, M = map(int, input().split())
h = list(map(int, input().split()))

ans = {}

for i in range(M):
    a, b = list(map(int, input().split()))

    if h[a - 1] > h[b - 1]:
        ans[b - 1] = False
        h[b - 1] = h[a - 1]
    elif h[a - 1] < h[b - 1]:
        ans[a - 1] = False
        h[a - 1] = h[b - 1]
    else:
        ans[a - 1] = False
        ans[b - 1] = False

print(N - len(ans))
import sys
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
def resolve():
    N, M = lr()
    H = lr()
    road = [-1]*N
    for i in range(M):
        a, b = lr()
        mab = max(H[a-1], H[b-1])
        road[a-1] = max(mab, road[a-1])
        road[b-1] = max(mab, road[b-1])
    ans = 0
    for i in range(N):
        if road[i] == H[i]:
            ans += 1
    print(ans)
resolve()
n, m = map(int, input().split())
h = {}
v = []
for i in input().split():
  h[int(i)] = []
  v.append(int(i))

for i in range(m):
  a, b = map(int, input().split())
  h[v[a-1]].append(v[b-1])
  h[v[b-1]].append(v[a-1])
  
ans = 0

for key, value in h.items():
  if len(value) == 0:
    ans += 1
    continue

  if key > max(value):
    ans += 1

print(ans)
n,m=map(int,input().split())
h=list(map(int,input().split()))
ppp=[]
for _ in range(m):
  r=list(map(int, input().split()))
  ppp.append(r)
c=0
p = list(map(list, set(map(tuple, ppp))))
for i in range(1,n+1):
  rr=[]
  rrr=[]
  for road in p:
 
    if road[0] == i:
      rr.append(road[1])

 
  if rr!=[]:
    for rra in rr:
      rrr.append(h[rra-1])

  if rrr!=[]:

    if h[i-1] > max(rrr):
      c+=1
  else:
    c+=1
print(c)
X = int(input())

for b in range(-10**3,10**3):
  z = X + b**5 
  for a in range(-10**3,10**3):
    if a**5 == z:
      print(a,b)
      exit()
import itertools
X = int(input())

l = [i for i in range(-1000, 1000)]
c = itertools.permutations(l, 2)
for a, b in c:
    if a**5 - b**5 == X:
        print(a, b)
        break
X = int(input())
if X == 0:
  print(0,0)
else:
  for i in range(-121,122):
    for j in range(-121,122):
      if i==j:
        continue
      else:
        if X%(i-j) == 0:
          if X == i**5 - j**5:
            print(i,j)
            exit()
X = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

d = make_divisors(X) 

ans =[0,0]

for i in d:

  for j in range(-10000,10000):
    if j**5 - (j-i)**5 == X:
      print(j,j-i)
      exit()
N = int(input())
array = [_**5 for _ in range(0,120)]

for x in array[:]:
    for y in array[:]:
        if x - y == N:
            print(array.index(x),array.index(y))
            exit()
        elif x + y == N:
            print(array.index(x),-array.index(y))
            exit()
x = int(input())

root = int(x**(0.2))

flag = 0
for i in range(root - 400, root + 400):
    for j in range(-100, root + 400):
        if i!=j:
            if x%(i-j) == 0:
                if i**5-j**5 == x:
                    print(i, j)
                    flag = 1
                    break
    if flag:
        break
import sys
x = int(input())
for i in range(-120, 120):
    for j in range(-120, 120):
        if i**5 - j**5 == x:
            print(i, j)
            sys.exit()
X = int(input())
flag = 0
for A in range(-300,301):
    for B in range(-300,301):
        if A**5 - B**5 == X:
            print(A,B)
            flag = 1
        if flag==1:
            break
    if flag==1:
        break
import sys
x=int(input())
for a in range(-1000,1000):
  for b in range(-1000,1000):
    if a**5 - b**5 == x:
      print(a,b)
      sys.exit()
x=int(input())

for i in range(290):
        n=x+(i-145)**5
        for j in range(290):
            if (j-145)**5==n:
                print(j-145,i-145)
                exit()
n = int(input())
flag = False
for i in range(10**8):
    for j in range(-10**4,10**4):
        if i**5 - j **5 == n :
            print(i,j)
            flag = True
            break
    if flag == True :
        break
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def f(a, b):
    return pow(a, 5) - pow(b, 5)
 
def main():
    x = int(readline())    
    for i  in range(-1000, 1001):
        for j in range(-1000, 1001):
            if i**5 - j**5 == x:
                print(i, j)
                return
if __name__ == '__main__':
    main()
import sys

def resolve():
    x=int(input())
    i=1
    while 1:
        for j in range(i):
            if x==i**5-j**5:
                print(i,j)
                sys.exit()
            elif x==i**5+j**5:
                print(i, -1*j)
                sys.exit()
        i+=1
resolve()
X = int(input())

#x^5-y^5=(x-y)(x^4+x^3y+x^2y^2+xy^3+y^4)

#for x in range(1, 121):
#  if ((x**5) - ((x-1)**5)) >= 1000000000:
#    print(x)

for a in range(0, 121):
  for b in reversed(range(-122, 120)):
    if b**5 == a**5-X:
      print(a, b)
      exit()
X = int(input())
# X = 1
stopFlag = 0
for i in range (-201, 201):
    a = i
    for j in range(-201, 201):
        if a**5 - j**5 == X:
            print (a, j)
            stopFlag = 1            
        if stopFlag:
            break
    if stopFlag:
        break
x = int(input())

for i in range(-200,200):
    for j in range(-200,200):
        if i**5 - j**5 == x:
            print(i,j)
            exit()
x=int(input())
[i**5-x-j**5or print(i,j)+exit()for i in range(200)for j in range(-i,i)]
import numpy as np


def main():
    x = int(input())
    A = np.arange(-120, 120)
    a = A ** 5
    for i, a_1 in enumerate(a):
        for j, a_2 in enumerate(a):
            if a_1 - a_2 == x:
                print(A[i], A[j])
                return


if __name__ == "__main__":
    main()
x = int(input())

for a in range(10**3):
  for b in range(10**3):
    frag = False
    if a ** 5 - b ** 5 == x:
      print(a,b)
      frag = True
      break
    elif (-a) ** 5 - b ** 5 == x:
      print(-a,b)
      frag = True
      break
      
    elif a ** 5 - (-b) ** 5 == x:
      print(a,-b)
      frag = True
      break
      
    elif (-a) ** 5 - (-b) ** 5 == x:
      print(-a,-b)
      frag = True
      break
  if frag == True:
      break
x=int(input())
for a in range(120):
  for b in range(-99,a):
    if a**5-b**5==x: print(a,b); exit()
n = int(input())
a = []
for i in range(1000):
         a.append(i ** 5)
for i in range(1000):
         for j in range(-1000,1000):
                  if (a[i]) - (j ** 5) == n:
                           print(i,j)
                           exit()
X = int(input())
x = 1
while ((x-1)**4)*5 < X:
    x += 1
for i in range(x):
    for j in range(-x, i):
        if i**5-j**5 == X:
            a = [i,j]
            break 
print(*a)
N=int(input())
for A in range(-118,120):
  for B in range(-119,119):
    if A**5-B**5==N:
      print(A,B)
      exit()
x = int(input())

for i in range(1000):
    for j in range(1000):
        a = i**5
        b = j**5
        if a-b == x:
            print(i,j)
            exit()
        elif a+b == x:
            print(i,-j)
            exit()
        elif -a-b == x:
            print(-i,-j)
            exit()
x = int(input())
a = 0
b = 0

for i in range(120):
    for j in range(-100, 120):
        if i**5 - j**5 == x:
            a = i
            b = j

print(str(a)+" "+str(b))
X = int(input())
a = []
for i in range(4000):
  a.append(i**5)
for i in range(4000):
  if X + a[i] in a:
    A = int((X + a[i])**0.2)
    B = i
  elif X - a[i] in a:
    A = int((X - a[i])**0.2)
    B = -i
print(A,B)
import sys

X = int(input())
i = 0

while 1:
    i += 1
    for j in range(-i+1, i):
        if i**5 - j**5 == X:
            print(i, j)
            sys.exit()
# abc166 D
x = int(input())

for a in range(-118, 120):
    ans = False
    for b in range(-119, 119):
        if a ** 5 - b** 5 == x:
            print("{} {}".format(a, b))
            ans = True
            break
    if ans:
        break
X=int(input())
for a in range(-118,120):
  for b in range(-118,a+1):
    if a**5-b**5==X:
      print("%s %s" % (a,b))
      exit()
import sys
import heapq
from decimal import Decimal

input = sys.stdin.readline

x = int(input())


for i in range(1,1000):
    for j in range(-1000,1000):
        if i**5 - j**5 == x:
            print(i,j)
            exit(0)
X = int(input())

for i in range(-1000, 1001):
    for j in range(-1000, 1001):
        if i**5 - j**5 == X:
            print(i, j)
            exit()
import sys
X = int(input())
for i in range(-118,120):
  for j in range(-119,119):
    if i**5 - j**5 == X:
      print(i,j)
      sys.exit()
X = int(input())

def search(x):
    for A in range(-1000, 1000):
        for B in range(-1000, 1000):
            A5 = A**5
            B5 = B**5
            if A5 - B5 == x:
                print(A, B)
                return

search(X)
import itertools


X = int(input())
ans_A = 0
ans_B = 0
for i, j in itertools.combinations(range(-120, 120), 2):
    j *= -1
    if i**5 - j**5 == X:
        ans_A = i
        ans_B = j
        break
print(ans_A, ans_B)
from math import sqrt

x = int(input())

for i in range(-int(sqrt(sqrt(x))), int(sqrt(sqrt(x))) + 1):
    for j in range(-int(sqrt(sqrt(x))), int(sqrt(sqrt(x))) + 1):
        if i ** 5 - j ** 5 == x:
            print(i, j)
            exit()
X=int(input())

a=False
for i in range(10**3):
    if a==False:
        for j in range(-10**3,10**3):
            if i**5-j**5==X:
                print(i,j)
                a=True
                break
x = int(input())
for a in range(-5000,5001):
  for b in range(-5000,5001):
    if(a**5-b**5==x):
      print(a,b)
      break
  else:continue
  break
X=int(input())
for i in range(-150,150):
  for j in range(-150,150):
    if i**5-j**5==X:
      A=i
      B=j
print(*[A,B])
# coding:utf-8
x = int(input())

for i in range(-120, 120):
    for j in range(-120, 120):
        if i**5 - j**5 == x:
            print(i, j)
            exit()
X = int(input())
A = range(-400, 400)
for a in A:
    for b in A:
        if X == a ** 5 - b ** 5:
            print(a, b)
            exit()
x = int(input())
for a in range(-10000, 10001):
    p = a ** 5
    l, r = -10000, 10001
    while r - l > 1:
        m = (l + r) // 2
        if m ** 5 <= p - x:
            l = m
        else:
            r = m
    if l ** 5 == p - x:
        print(a, l)
        exit(0)
x=int(input())
for a in range(999):
  for b in range(-999,999):
    if a**5-b**5==x:
      print(a,b)
      exit()
import sys
x=int(input())
for a in range(-1000,1000):
    for b in range(-1000,1000):
        if a**5-b**5==x:
            print(a,b)
            sys.exit()
x = int(input())

div = set()
for i in range(1, int(x**0.5)+1):
    if x % i == 0:
        div.add(i)
        div.add(x//i)

div = list(div)

for d in div:
    for a in range(int(pow(x, 1/2))+1):
        b = a - d
        if a**5 - b**5 == x:
            print(a, b)
            break
X = int(input())

flg = 0
for i in range(-200,200):
  if flg == 1:
    break

  for j in range(-200,200):
      if i**5 - j **5 == X:
        print(i,j)
        flg = 1
        break
import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

x=INT()

for i in range(-500,501):
    for j in range(-500,501):
        if i**5-j**5==x:
            print(i,j)
            exit()
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections


x = int(input())
for i in range(-1000,1001):
    for j in range(-1000,1001):
        if i**5 - j**5 == x:
            print(i,j)
            sys.exit()
x = int(input())

for a in range(-120, 120):
  f_a = a**5
  r_b = (x-f_a)**(1/5).real
  b = round(r_b.real)
  if f_a - b**5 == x:
    print(a, b)
    break
  b *= -1
  if f_a - b**5 == x:
    print(a, b)
    break
X = int(input())

l = range(-10**3,10**3)

for i in l:
  for j in l:
    if i**5 - j**5 == X:
      print(str(i) + " " + str(j))
      exit()
x=int(input())
a=[]
for i in range(220):
  a.append(i**5)
for i in range(220):
  y=a[i]-x
  if y in a:
    print(i,a.index(y))
    break
  elif -y in a:
    print(i,-a.index(-y))
    break
x=int(input())
ans=[]
for a in range(1001):
    for b in range(-1000,1001):
        if a==b==0:
            pass
        else:
            if x%(a**4+a*a*a*b+a*a*b*b+a*b*b*b+b**4)==0:
                if a**5-b**5==x:
                    print(a,b)
                    exit()
import sys

x = int(input())

for i in range(-118, 120):
    for j in range(-119, 119):
        if i**5 - j**5 == x:
            print(i, j)
            sys.exit()
a5=[i**5 for i in range(300)]
x=int(input())
flag=0
for i in range(300):
  for j in range(300):
    if flag==0 and a5[i]-a5[j]==x:
      print(str(i)+" "+str(j))
      flag=1
    if flag==0 and a5[i]+a5[j]==x:
      print(str(i)+" -"+str(j))
      flag=1
X = int(input())
i = 1
ok = False
while i * i <= X and not ok:
  if X % i == 0:
    for x in (i, X//i):
      A = -10000
      while A <= 10000:
        if A**5-(A-x)**5 == X:
          print(A, A-x)
          ok = True
          break
        A += 1
      if ok:
        break
  i += 1
NUM=1000

X=int(input())

flg=False

for i in reversed(range(NUM)):
    for j in range(-1*NUM,NUM):
        res=(i**5)-(j**5)
        if res==X:
            ans_A=i
            ans_B=j
            flg=True
            break
    if flg:
        break

print(ans_A,ans_B)
x =int(input())
a =[i**5 for i in range(120)]
for i in range(120):
    for j in range(i+1,120):
        if a[j] -a[i] ==x:
            print(j,i)
            break
        if a[j] +a[i] ==x:
            print(j,-i)
            break
x = int(input())

for i in range(400):
    for j in range(i - 800, i):
        if i ** 5 - j ** 5 == x:
            print(i, j)
            exit()
from numba import njit


@njit
def main(X):
    for a in range(-2000, 2001):
        for b in range(-2000, 2001):
            if pow(a, 5) - pow(b, 5) == X:
                print(a, b)
                return


if __name__ == '__main__':
    X = int(input())
    main(X)
x = int(input())
for a in range(-1000, 1000):
    for b in range(-1000, 1000):
        if a**5 - b**5 == x:
            print(a, b)
            exit()
X=int(input())

arr=[]
for i in range(0,640):
    arr.append(i**5)
    arr.append(-i**5)

arr2=[]
arr3=[]
import itertools
l=itertools.combinations_with_replacement(arr,2)
for i in l:
    arr2.append(i[0]-i[1])
    arr3.append([i[0],i[1]])
import math

ans=arr3[arr2.index(X)]
print(int(math.pow(abs(ans[0]), 1/5))*(1 if ans[0]>=0 else -1), int(math.pow(abs(ans[1]), 1/5))*(1 if ans[1]>=0 else -1))
import itertools


X = int(input())

u = -1000
A = []
while u < 1000:
    A.append(u)
    u += 1
AA = list((itertools.product(A, repeat=2)))
for a,b in AA:
    if a**5-b**5 == X:
        print(a,b)
        break
X = int(input())
for A in range(-1000,1000):
    A5 = A**5
    for B in range(-1000,1000):
        if A5 - B**5 ==X:
            print(A,B)
            exit()
x = int(input())

for a in range(-118, 120):
    a_5 = a*a*a*a*a
    for b in range(-119, 119):
        b_5 = b*b*b*b*b
        if a_5 - b_5 == x:
            print(a, b)
            break
    else:
        continue

    break
X = int(input())

CNT = 500

for a in range(-CNT, CNT):
    for b in range(-CNT, CNT):
        if X == a ** 5 - b ** 5:
            print(a, b)
            exit()
import math
import sys
x=int(input())
for i in range(0,500):
    for j in range(-200,i):
        if i**5-j**5==x:
            print(i,j)
            sys.exit()
data = {}
count = 0
max_num = 10**9
before = 0
while True:
    tmp = count**5
    data[count] = tmp
    data[-count] = -tmp
    count+=1
    if tmp - before > max_num:
        break
    before = tmp

x = int(input())
for k, v in data.items():
    for k2, v2 in data.items():
        if v - v2 == x:
            print(k, k2)
            exit()
import sys
x = int(input())
for a in range(-1000, 1000):
    for b in range(-1000, 1000):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            sys.exit()
#!/usr/bin/env python3
import sys

input = sys.stdin.readline


def ST():
    return input().rstrip()


def I():
    return int(input())


def MI():
    return map(int, input().split())


def LI():
    return list(MI())


X = I()

for a in range(-118, 120):
    for b in range(-119, 119):
        if a ** 5 - b ** 5 == X:
            print(a, b)
            exit()
X = int(input())
for i in range(-120,120):
    for j in range(-120,120):
        if i**5 - j**5 == X:
            print(i,j)
            exit()
n = int(input())
for a in range(-200, 200):
  for b in range(-200, 200):
    if n == a ** 5 - b ** 5:
      print(a)
      print(b)
      quit()
X = int(input())
C = 0
for i in range(-1000,1000):
	if C == 1:
		break
	for j in range(-1000,1000):
		if i**5-j**5 == X:
			print(i,j)
			C += 1
			break
x = int(input())

for i in range(-500, 500):
    for j in range(-500, 500):
        if i**5-j**5 == x:
            a = i
            b = j
            break
print(a, b)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    x = int(input())

    flag = False

    for i in range(-118, 120):
        for j in range(-119, 119):
            if i**5- j**5 == x:
                print(i, j)
                flag = True
                break
        if flag:
            break




if __name__ == '__main__':
    main()
from sys import stdin, stdout
import math
import bisect
import re

x = int(stdin.readline().strip())

for a in range(-500, 500):
    for b in range(-500, 500):
        if a ** 5 - b ** 5 == x:
            stdout.writelines(str(a) + ' ' + str(b) + '\n')
            exit(0)
def main():
    X=int(input())
    for A in range(-1000,1000):
        for B in range(-1000,1000):
            if A**5-B**5==X:
                print(A,B)
                exit()

main()
X = int(input())
flag = False
for A in range(-120, 121):
    if flag == True:
        break
    for B in range(-121, A):
        if A**5 - B**5 == X:
            flag = True
            print(A, B)
            break
#!/usr/bin/env python3
import sys

x = int(input())

for i in range(-10 ** 3, 10 ** 3):
    for j in range(-10 **3, 10 ** 3):
        if (i ** 5) - (j ** 5) == x:
            print(i, j)
            sys.exit()
X = int(input())

for A in range(1000):
    for B in range(-1000, 1000):
        if A ** 5 - B ** 5 == X:
            print(A, B)
            exit()
import sys

x = int(input())
flag = False
a = 0

while True:
    for b in range(-a+1,a):
        if  a ** 5 - b  ** 5 == x:
            print(a,int(b))
            sys.exit()
    a += 1
import sys

X = int(input())

# X = 33

for a in range(-118, 120):
    for b in range(-119, 119):
        if a**5 - b**5 == X:
            print(a, b)
            sys.exit(0)
x = int(input())

flag = False
for a in range(-118, 120):
    if(flag): break
    for b in range(-118, 119):
        if(flag): break
        if pow(a, 5) - pow(b, 5) == x:
            print(a,b)
            flag = True
            break