A long time ago in some far country lived king Copa. After the recent king's reform, he got so large powers that started to keep the books by himself.

The total income A of his kingdom during 0-th year is known, as well as the total income B during n-th year (these numbers can be negative — it means that there was a loss in the correspondent year). 

King wants to show financial stability. To do this, he needs to find common coefficient X — the coefficient of income growth during one year. This coefficient should satisfy the equation:

A·Xn = B.

Surely, the king is not going to do this job by himself, and demands you to find such number X.

It is necessary to point out that the fractional numbers are not used in kingdom's economy. That's why all input numbers as well as coefficient X must be integers. The number X may be zero or negative.

Input

The input contains three integers A, B, n (|A|, |B| ≤ 1000, 1 ≤ n ≤ 10).

Output

Output the required integer coefficient X, or «No solution», if such a coefficient does not exist or it is fractional. If there are several possible solutions, output any of them.

Examples

Input

2 18 2


Output

3

Input

-1 8 3


Output

-2

Input

0 0 10


Output

5

Input

1 16 5


Output

No solution

Source: codeforces | Difficulty: MEDIUM
Tags: Mathematics

Complete search


Solutions:
import math
import sys
(a, b, c) = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
for i in range(-abs(b), abs(b) + 1):
	if a * pow(i, c) == b:
		print(i, end='')
		sys.exit(0)
print('No solution', end='')


import sys

def rr():
	return sys.stdin.readline().rstrip()
rp = print

def print(*args, **kwargs):
	rp('DBG:# ', *args, **kwargs, file=sys.stderr)

def rri():
	return int(rr())

def rrl():
	return list(map(int, rr().split()))

def rrt():
	return tuple(map(int, rr().split()))

def rrle():
	return (line.rstrip() for line in sys.stdin.readlines())

def rrtl():
	return [tuple(map(int, l.split())) for l in rrle()]
from collections import defaultdict

def mus(d=lambda : 0):
	return defaultdict(lambda : defaultdict(d))

def dd0(d=lambda : 0):
	return defaultdict(d)

def ms(x, y, d=0):
	return [[0] * y for i in range(x)]

def ar(x, d=0):
	return [d] * x

def ppm(m, n=0, x=0, y=0):
	print('\n'.join(('\t'.join((str(m[j][i]) for j in range(y or n))) for i in range(x or n))))

def ppa(a, n):
	print('\t'.join(map(str, a[0:n])))

def ppl(a=0, x=[1]):
	x[0] = a or x[0] + 1
	print('-' + '- -' * 14 + '-# ' + str(x[0] - 2) + ' #-' + '- -' * 14 + '-')

def fltn(a):
	(i for sub in a for i in sub)

def yn(x):
	return 'YES' if x else 'NO'

def cpc(arr):
	return zip(arr, arr[1:])
from itertools import accumulate
from itertools import groupby
from itertools import permutations

def grp(x, key=None):
	return ((i, sum((1 for _ in g))) for (i, g) in groupby(x, key=key))
import math

def rnar():
	return (*rrl(), rrl())

def rn():
	return (*rrl(),)

def dpp(a, b=''):
	print('#| {} |#:^ {} ^:'.format(a, b))
MOD17 = 10 ** 9 + 7

def read():
	return (*rrl(),)

def solve(a, b, n):
	if a == 0 and b == 0:
		return '0'
	elif a == 0 and b != 0:
		return 'No solution'
	elif a != 0 and b == 0:
		return '0'
	f = b / a
	s = 1 / n
	x = (-(f < 0) + (f > 0)) * abs(b / a) ** (1 / n)
	try:
		x = round(x)
	except Exception:
		x = 0
	if a * x ** n == b:
		return x
	else:
		return 'No solution'
	return ans
test_count = 1
for _ in range(test_count):
	input_data = read()
	result = solve(*input_data)
	rp(result)


(a, b, n) = map(int, input().split())
for x in range(-1000, 1001):
	if a * x ** n == b:
		exit(print(x))
print('No solution')


def Accounting(A, B, n):
	import math
	if abs(A) > 1000 or abs(B) > 1000 or n < 1 or (n > 10):
		return
	if B == 0 and A == 0:
		return 0
	if A == 0:
		return 'No solution'
	t = abs(B) / abs(A)
	X = t ** (1 / n)
	epsilon = 1e-05
	if abs(X - math.ceil(X)) < epsilon:
		if A > 0 and B > 0 or (A < 0 and B < 0):
			return math.ceil(X)
		else:
			return -math.ceil(X)
	else:
		return 'No solution'
L = input().split()
A = int(L[0])
B = int(L[1])
n = int(L[2])
print(Accounting(A, B, n))


(a, b, n) = map(int, input().split())
if a == 0 and b == 0:
	print(1)
elif a == 0 or b % a:
	print('No solution')
else:
	i = 0
	f = -1 if b // a < 0 else 1
	t = abs(b // a)
	while True:
		s = i ** n
		if s == t:
			print(f * i)
			break
		elif s > t:
			print('No solution')
			break
		i += 1


(a, b, n) = map(int, input().split())
if a == 0:
	if 0 * 1 ** n == b:
		print(1)
	else:
		print('No solution')
	quit()
x = round(abs((b / a) ** (1 / n)))
y = -x
if a * x ** n == b:
	print(x)
elif a * y ** n == b:
	print(y)
else:
	print('No solution')


(a, b, n) = map(int, input().split())
for x in range(1000, -1001, -1):
	if a * x ** n == b:
		print(x)
		break
else:
	print('No solution')


import bisect
from itertools import accumulate
import os
import sys
import math
from decimal import *
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def SieveOfEratosthenes(n):
	prime = []
	primes = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if primes[p] == True:
			prime.append(p)
			for i in range(p * p, n + 1, p):
				primes[i] = False
		p += 1
	return prime
(a, b, n) = map(int, input().split())
neg = 1
if a == 0 and b == 0:
	print(0)
elif a == 0:
	print('No solution')
else:
	if a < 0:
		neg = -1
		a = abs(a)
	if b < 0:
		neg = neg * -1
		b = abs(b)
	if b % a != 0:
		print('No solution')
		exit()
	c = int(b / a)
	for i in range(0, 10 ** 6):
		if i ** n == c:
			print(i * neg)
			exit()
	print('No solution')


(a, b, n) = map(int, input().split())
res = [x for x in range(-abs(b) - 1, abs(b) + 1) if a * x ** n == b]
if len(res) > 0:
	print(res[0])
else:
	print('No solution')


import math

def nthRoot(Base, n):
	return math.pow(Base, 1.0 / n)
container = list(map(float, input().split()))
A = container[0]
B = container[1]
n = int(container[2])
helper = 0.0
if A == 0 and B == 0:
	helper = 0
elif A == 0 and B != 0 or (B / A < 0 and n % 2 == 0 and (n != 1)):
	helper = 2.234553
else:
	helper = B / A
needMinus = False
if helper < 0 and n % 2 != 0 and (n != 1):
	needMinus = True
	helper = -helper
result = nthRoot(helper, n)
if result > 0:
	result += 1e-05
	result = math.trunc(result * 1000)
	result /= 1000
temp = int(math.trunc(result))
if result == temp:
	print(-temp if needMinus else temp)
else:
	print('No solution')


(n, m, k) = map(int, input().split())
for i in range(-1101, 1100):
	if n * i ** k == m:
		print(i)
		exit()
print('No solution')


(A, B, n) = map(int, input().split())
X = 1001
for i in range(-1000, 1001):
	if A * i ** n == B:
		X = i
		break
if X != 1001:
	print(X)
else:
	print('No solution')


import sys
(a, b, n) = map(int, input().split())
for i in range(-1000, 1001):
	if a * i ** n == b:
		print(i)
		sys.exit()
print('No solution')


a = list(map(int, input().split()))
flag = 0
for i in range(-1000, 1001):
	if a[0] * i ** a[2] == a[1]:
		print(i)
		flag = 1
		break
if flag == 0:
	print('No solution')


def ret(a, b, n):
	for i in range(-5000, 5000):
		if a * i ** n == b:
			print(i)
			break
	else:
		print('No solution')
(x, y, z) = map(int, input().split())
ret(x, y, z)


(a, b, n) = map(int, input().split())
flag = 0
for x in range(-1001, 1001):
	if a * pow(x, n) == b:
		print(x)
		flag = 1
		break
if flag == 0:
	print('No solution')


(a, b, n) = input().split()
import math
a = int(a)
b = int(b)
n = int(n)
c = 1
d = 1
if b == 0 and a == 0:
	ans = 0
elif a * b == 0:
	if a == 0:
		d = 0
	else:
		ans = 0
else:
	if a * b < 0:
		c = -1
		a = abs(a)
		b = abs(b)
	ans = pow(b / a, 1 / n)
if d:
	if ans - int(ans + 1e-08) < 1e-08:
		ans = int(ans + 1e-08) * c
	else:
		ans = 'No solution'
else:
	ans = 'No solution'
print(ans)


import sys

def bp(a, b):
	if b == 0:
		return 1
	if b & 1:
		return a * bp(a, b - 1)
	c = bp(a, b >> 1)
	return c * c
(a, b, n) = map(int, input().split())
if a == 0:
	if b == 0:
		print(1)
	else:
		print('No solution')
elif b % abs(a):
	print('No solution')
else:
	c = b // a
	if c < 0:
		if n & 1:
			d = int(pow(abs(c), 1.0 / n))
			d = round(d, 0)
			(flag, ans) = (0, -1)
			for i in range(-1, 2, 1):
				cur = d + i
				if bp(cur, n) == abs(c):
					flag = flag + 1
					ans = cur
			if flag:
				print(-ans)
			else:
				print('No solution')
		else:
			print('No solution')
	else:
		d = int(pow(c, 1.0 / n))
		(flag, ans) = (0, -1)
		for i in range(-1, 2, 1):
			cur = d + i
			if bp(cur, n) == c:
				flag = flag + 1
				ans = cur
		if flag:
			print(ans)
		else:
			print('No solution')


def uravnenie(a, b, n):
	for x in range(-1000, 1001):
		if a * x ** n == b:
			return x
	return 'No solution'
(A, B, N) = [int(i) for i in input().split()]
print(uravnenie(A, B, N))


(a, b, n) = [int(i) for i in input().split()]
f = 1
for i in range(-1000, 1001, 1):
	k = 1
	c = n
	while c > 0:
		k *= i
		c -= 1
	if a * k == b and f == 1:
		print(i)
		f = 0
if f == 1:
	print('No solution')


(a, b, n) = list(map(int, input().split()))
ans = 'No solution'
for i in range(-10000, 10000):
	if a * i ** n == b:
		ans = i
		break
print(ans)


(a, b, n) = list(map(int, input().split()))
if b == 0:
	print(0)
elif a == 0:
	print('No solution')
else:
	r = 1
	if (a < 0) ^ (b < 0):
		if n & 1:
			r = -1
		else:
			print('No solution')
			exit(0)
	r *= (abs(b) / abs(a)) ** (1 / n)
	if round(r, 9) % 1 == 0:
		print(int(round(r, 9)))
	else:
		print('No solution')


def accounting(r, pl, p):
	for i in range(-1000, 1002, 1):
		if r * i ** p == pl:
			print(i)
			break
	else:
		print('No solution')
(r, pl, p) = map(int, input().split())
accounting(r, pl, p)


(a, b, n) = map(int, input().split())
if a == 0 and b == 0:
	print(1)
elif a == 0 and b != 0:
	print('No solution')
elif a != 0 and b == 0:
	print('0')
elif b % a != 0:
	print('No solution')
else:
	temp = b / a
	if temp < 0 and n % 2 == 0:
		print('No solution')
	elif temp > 0:
		i = 1
		flag = 0
		while pow(i, n) <= temp:
			if pow(i, n) == temp:
				flag = 1
				break
			i = i + 1
		if flag == 0:
			print('No solution')
		else:
			print(i)
	elif temp < 0:
		i = 1
		flag = 0
		temp = -1 * temp
		while pow(i, n) <= temp:
			if pow(i, n) == temp:
				flag = 1
				break
			i = i + 1
		if flag == 0:
			print('No solution')
		else:
			print(-i)


(a, b, n) = map(int, input().split())
if a:
	if b / a > 0:
		x = float(b / a) ** (1 / n)
		if a * int(x) ** n == b:
			print(int(x))
		elif a * int(x + 1) ** n == b:
			print(int(x + 1))
		else:
			print('No solution')
	elif b / a < 0:
		if n % 2:
			x = float(-b / a) ** (1 / n)
			if a * int(-x) ** n == b:
				print(int(-x))
			elif a * int(-x - 1) ** n == b:
				print(int(-x - 1))
			else:
				print('No solution')
		else:
			print('No solution')
	else:
		print(0)
else:
	print('No solution') if b else print(0)


def pow(a, p):
	ret = 1
	while p:
		if p & 1:
			ret *= a
		a *= a
		p >>= 1
	return ret
(a, b, n) = map(int, input().split())
if not a and b:
	print('No solution')
elif not b:
	if not a:
		print(1)
	else:
		print(0)
else:
	ans = b // a
	if ans < 0 and n % 2 == 0:
		print('No solution')
		exit()
	k = 1
	while True:
		t = pow(k, n)
		if t > abs(ans):
			break
		elif t == ans:
			print(k)
			exit()
		elif pow(-k, n) == ans:
			print(-k)
			exit()
		k += 1
	print('No solution')


(A, B, n) = [int(x) for x in input().split()]

def main(A, B, n):
	if B == 0:
		return 0
	if A == 0:
		return 'No solution'
	if not B % A == 0:
		return 'No solution'
	K = B // A
	if K < 0:
		if n % 2 == 0:
			return 'No solution'
		K = K * -1
		for i in range(K + 1):
			j = i ** n
			if j == K:
				return i * -1
			if j > K:
				return 'No solution'
	for i in range(K + 1):
		j = i ** n
		if j == K:
			return i
		if j > K:
			return 'No solution'
print(main(A, B, n))


(a, b, n) = map(int, input().split())
if b < 0:
	z = -b
else:
	z = b
for x in range(-z, z + 1):
	if a * x ** n == b:
		print(x)
		exit()
print('No solution')


import sys
(a, b, n) = map(int, input().split())
for x in range(-abs(b) - 1, abs(b) + 1):
	if a * x ** n == b:
		print(x)
		sys.exit()
print('No solution')


(a, b, c) = map(int, input().split())
if b == 0:
	print(0)
elif a == 0:
	print('No solution')
else:
	if a * b > 0:
		d = round((b / a) ** (1 / c))
	else:
		d = -round((b / -a) ** (1 / c))
	if a * d ** c == b:
		print(d)
	else:
		print('No solution')


import sys
import math
(a, b, n) = map(int, input().split())
flag = 0
for i in range(-1000, 1001):
	if a * i ** n == b:
		print(i)
		flag = 1
		break
if flag == 0:
	print('No solution')


p = input().rstrip().split(' ')
A = int(p[0])
B = int(p[1])
X = int(p[2])
if A == 0 and B != 0:
	print('No solution')
elif A == 0 and B == 0:
	print(X // 2)
else:
	f = B / A
	if f < 0:
		U = abs(f) ** (1 / X)
		x = list(str(U))
		x.insert(0, '-')
		F = x.index('.')
		Y = x[F:len(x)]
		if len(Y) == 2 and Y[0] == '.' and (Y[1] == '0'):
			x = x[0:F]
			C = ''.join(x)
			print(int(C))
		elif Y[0] == '.' and Y[1] == '9' and (Y[2] == '9') and (Y[3] == '9') and (Y[4] == '9'):
			x = x[0:F]
			C = ''.join(x)
			if int(C) < 0:
				print(int(C) - 1)
			else:
				print(int(C) + 1)
		else:
			print('No solution')
	else:
		U = f ** (1 / X)
		x = list(str(U))
		F = x.index('.')
		Y = x[F:len(x)]
		if len(Y) == 2 and Y[0] == '.' and (Y[1] == '0'):
			x = x[0:F]
			C = ''.join(x)
			print(int(C))
		elif Y[0] == '.' and Y[1] == '9' and (Y[2] == '9') and (Y[3] == '9') and (Y[4] == '9'):
			x = x[0:F]
			C = ''.join(x)
			if int(C) < 0:
				print(int(C) - 1)
			else:
				print(int(C) + 1)
		else:
			print('No solution')


datos = input().split()
a = int(datos[0])
b = int(datos[1])
n = int(datos[2])
if a == 0 and b == 0:
	print(n // 2)
elif a == 0:
	print('No solution')
elif a == 1 and b == 1000 and (n == 3):
	print(10)
else:
	base = b / a
	raiz = 1 / n
	if base < 0 and n % 2 == 0:
		print('No solution')
	else:
		if base < 0:
			rpta = abs(base) ** raiz
			rpta = rpta * -1
		else:
			rpta = base ** raiz
		if rpta == int(rpta):
			print(int(rpta))
		else:
			print('No solution')


gi = lambda : list(map(int, input().split()))
(a, b, n) = gi()
if a == 0:
	if b == 0:
		print(0)
	else:
		print('No solution')
	exit()
if b % a:
	print('No solution')
	exit()
x = -1000
while x <= 1000:
	if x ** n == b // a:
		print(x)
		exit()
	x += 1
print('No solution')


m = list(map(int, input().split()))
(A, B, n) = (m[0], m[1], m[2])
x = 0
if B == 0 and n < 11:
	print(0)
elif A == 0 and B != 0 and (n < 11):
	print('No solution')
elif n < 11:
	c = abs(B / A)
	x = c ** (1 / n)
	x = round(x, 10)
	if x % 1 == 0:
		if A < 0 and B > 0 and (n % 2 == 0):
			print('No solution')
		elif A < 0 and B > 0 and (n % 2 != 0):
			print(-int(x))
		elif B < 0 and A > 0 and (n % 2 == 0):
			print('No solution')
		elif B < 0 and A > 0 and (n % 2 != 0):
			print(-int(x))
		else:
			print(int(x))
	else:
		print('No solution')


import sys
import math
import bisect
import re

def solve(a, b, n):
	for x in range(-1000, 1001):
		if a * x ** n == b:
			return x
	return 'No solution'

def main():
	(a, b, n) = map(int, input().split())
	x = solve(a, b, n)
	print(x)
main()


import sys
import math
import itertools
import functools
import collections
import operator

def ii():
	return int(input())

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

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def wr(arr):
	return ' '.join(map(str, arr))

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)
(a, b, n) = mi()
if b == 0:
	print(0)
elif a == 0 and b != 0 or abs(pow(math.ceil(pow(abs(b / a), 1 / n)), n) - b / a * (a * b // abs(a * b))) > 10 ** (-6):
	print('No solution')
else:
	print(math.ceil(pow(abs(b / a), 1 / n) * (a * b // abs(a * b))))


(a, b, n) = map(float, input().split())
flag = 0
for i in range(-1000, 1001):
	if a * i ** n == b:
		print(i)
		flag = 1
		break
if flag == 0:
	print('No solution')


import math
(A, B, n) = [float(item) for item in input().split(' ')]
helper = 0
if A == 0 and B != 0:
	helper = 2
elif A == 0 and B == 0:
	helper = 1
else:
	helper = B / A
need_minus = helper < 0
if need_minus:
	helper = -helper
result = pow(helper, 1.0 / n)
if not need_minus:
	result += 1e-09
	result *= 100000000
	result = math.floor(result)
	result /= 100000000
if math.floor(result) == result:
	print(int(result) if not need_minus else int(-result))
else:
	print('No solution')


import sys
import math
(A, B, n) = tuple([int(x) for x in sys.stdin.readline().split()])
if A == 0:
	if B == 0:
		print('0')
	else:
		print('No solution')
	sys.exit(0)
target = B / A
for i in range(-10000, 10000):
	if i ** n == target:
		print(i)
		sys.exit(0)
print('No solution')


(a, b, n) = map(int, input().split())
s = 0
for x in range(-abs(b), abs(b) + 1):
	if a * x ** n == b:
		print(x)
		s = 1
		break
if s == 0:
	print('No solution')


import math
(a, b, n) = map(int, input().split())
i = -1000
if a == 0 and b == 0:
	print(0)
elif a == 0 and b != 0:
	print('No solution')
elif b % a == 0:
	while i < 1001:
		if int(math.pow(i, n)) == int(b / a):
			print(i)
			exit()
		i += 1
	print('No solution')
else:
	print('No solution')


import math
from decimal import Decimal
import heapq

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)
(a, b, n) = map(int, input().split())
if a > 0 and b < 0 and (n % 2 == 0) or (a < 0 and b > 0 and (n % 2 == 0)):
	print('No solution')
	exit()
if a == 0 and b == 0:
	print(5)
	exit()
elif a == 0 and b != 0:
	print('No solution')
	exit()
elif b == 0:
	print(0)
	exit()
if abs(b) % abs(a) != 0:
	print('No solution')
	exit()
x = abs(b // a)
for i in range(1, x + 1):
	if x == pow(i, n):
		if a < 0 and b > 0 or (a > 0 and b < 0):
			print(-i)
			exit()
		else:
			print(i)
			exit()
print('No solution')


def lowbit(x):
	return x & -x
flag = False
(a, b, n) = list(map(int, input().split(' ')))
for x in range(-1005, 1005):
	if a * x ** n == b:
		print(x)
		flag = True
		break
if flag == False:
	print('No solution')


line = input()
line = list(line.split(' '))
a = int(line[0])
b = int(line[1])
n = int(line[2])
x = 0
if a == 0 and b == 0:
	print('5')
elif a == 0:
	print('No solution')
elif n % 2 == 0 and b / a < 0:
	print('No solution')
elif b / a < 0:
	x = -abs(b / a) ** (1 / n)
	if x - round(x) != 0:
		print('No solution')
	else:
		print(round(x))
elif a == 1 and b == 1000 and (n == 3):
	print(round((b / a) ** (1 / n)))
else:
	x = (b / a) ** (1 / n)
	if x - round(x) != 0:
		print('No solution')
	else:
		print(round(x))


(A, B, n) = tuple(map(int, input().split()))
ok = False
for i in range(-1001, 1001):
	if A * pow(i, n) == B:
		print(i)
		ok = True
		break
if not ok:
	print('No solution')


l = list(map(int, input().split()))
(A, B, n) = (l[0], l[1], l[2])
if A == 0 and B == 0:
	print('5')
elif A == 0 and B != 0:
	print('No solution')
elif A != 0 and B == 0:
	print('0')
elif (B / A).is_integer():
	c = int(B / A)
	e = abs(c)
	f = e ** (1 / n)
	if f.is_integer():
		if c < 0:
			print(-int(f))
		else:
			print(int(f))
	elif int(f) + 1 - f < 10 ** (-3):
		if c < 0:
			print(-(int(f) + 1))
		else:
			print(int(f) + 1)
	else:
		print('No solution')
else:
	print('No solution')


(a, b, c) = map(int, input().split())
try:
	(e, m) = (int(b // a), 1 / c)
	t = abs(e) ** m
	rt = round(t)
	if b % a != 0:
		print('No solution')
	elif abs(rt - t) > 0.0001:
		print('No solution')
	elif e < 0 and m % 2 == 0:
		print('No solution')
	else:
		print(int(rt) if e > 0 else -1 * int(rt))
except:
	print(1 if a == b == 0 else 'No solution')


(a, b, n) = map(int, input().split())
if a == 0:
	if b == 0:
		print(1)
	else:
		print('No solution')
elif b == 0:
	print(0)
else:
	e = b / a
	t = b / a / abs(b / a)
	e = e * t
	x = pow(e, 1 / n)
	x = int(x) * int(t)
	if x ** n * a == b:
		print(x)
	elif (x + 1) ** n * a == b:
		print(x + 1)
	elif (x + 2) ** n * a == b:
		print(x + 2)
	else:
		print('No solution')


import sys

def fail():
	print('No solution')
	sys.exit()

def succeed(x):
	print(x)
	sys.exit()
(a, b, n) = map(int, input().split())
if b == 0:
	succeed(0)
if a == 0:
	fail()
if b % abs(a) != 0:
	fail()
sign = 1
if b // a < 0 and n % 2 == 1:
	sign = -1
x = sign * round(abs(b // a) ** (1 / n))
if a * x ** n == b:
	succeed(x)
fail()


import math, sys
(a, b, n) = map(float, input().split())
if a == 0 and b == 0:
	print(5)
	sys.exit()
try:
	ans = math.pow(abs(b / a), 1 / n)
	if n % 2 == 1 and b / a < 0:
		ans *= -1
except:
	print('No solution')
	sys.exit()
if math.ceil(abs(ans)) == math.floor(abs(ans) + 5e-11):
	print(int(abs(ans) + 5e-11) * (-1 if ans < 0 else 1))
else:
	print('No solution')


(a, b, n) = [int(i) for i in input().split()]
for i in range(-1000, 1001):
	if a * pow(i, n) == b:
		print(i)
		exit()
print('No solution')


__author__ = 'runekri3'
(a, b, n) = list(map(int, input().split()))
if a == 0:
	if b == 0:
		print(0)
	else:
		print('No solution')
else:
	income_multiplied = b / a
	if income_multiplied != int(income_multiplied):
		print('No solution')
	else:
		for x in range(-1000, 1001):
			if x ** n == income_multiplied:
				print(x)
				break
		else:
			print('No solution')


(a, b, n) = map(int, input().split())
for i in range(-1000, 1002, 1):
	if a * i ** n == b:
		print(i)
		break
else:
	print('No solution')


import cmath

def floor(x):
	return x - int(x)
(a, b, k) = map(int, input().split())
if a == 0:
	if a == b:
		exit(print('1'))
	else:
		exit(print('No solution'))
if b / a < 0 and k % 2 == 0:
	exit(print('No solution'))
t = pow(b / a, 1 / k)
t = complex(t)
t1 = t.real
t2 = t.imag
t = abs(complex(t1, t2))
p1 = t - int(t)
p1 = str(p1)
p1 = p1[2:8]
if p1 == '999999':
	t = int(t) + 1
if floor(t) == 0:
	p = b / a
	if p < 0:
		p = -1
	else:
		p = 1
	print(p * int(t))
else:
	print('No solution')


(a, b, n) = map(int, input().split())
ans = 'No solution'
if a == 0 and b == 0:
	ans = 5
elif a == 0 and b != 0:
	ans
elif a != 0 and b == 0:
	ans = 0
elif b % a != 0:
	ans
else:
	a = b / a
	if a < 0:
		a = abs(a)
		b = 0
	for i in range(1001):
		if i ** n == a:
			ans = i
	if b == 0:
		ans = -ans
print(ans)


x = [int(i) for i in input().split()]
a = x[0]
b = x[1]
n = x[2]
solution = False
if a == 0:
	if b == 0:
		print('5')
	else:
		print('No solution')
elif b % a != 0:
	print('No solution')
else:
	for x in range(-1000, 1001):
		c = 1
		for i in range(n):
			c = c * x
		if c == b / a:
			print(x)
			solution = True
			break
	if solution == False:
		print('No solution')


(a, b, n) = map(int, input().split())
ans = 0
flag = False
for x in range(-1000, 1001, 1):
	if a * x ** n == b:
		ans = x
		flag = True
		break
if flag == False:
	print('No solution')
else:
	print(ans)


import math
(a, b, n) = map(int, input().strip().split(' '))
if a == 0 and b == 0:
	print(0)
elif a == 0 and b != 0:
	print('No solution')
elif b == 0 and a != 0:
	print(0)
elif a == b:
	print(1)
elif a == -b:
	if n % 2 != 0:
		print(-1)
	else:
		print('No solution')
elif abs(b) < abs(a) and n >= 0:
	print('No solution')
elif abs(b) % abs(a) != 0:
	print('No solution')
else:
	p = b // a
	f = 0
	for j in range(1, abs(p + 1)):
		if j ** n == abs(p):
			if p < 0:
				if n % 2 != 0:
					f = 1
					print(-j)
					break
			else:
				f = 1
				print(j)
				break
	if f == 0:
		print('No solution')


from math import log
import math
(a, b, n) = map(int, input().split())
if a == 0 or b == 0:
	if a == 0 and b == 0:
		print(0)
	elif b == 0 and a != 0:
		print(0)
	else:
		print('No solution')
elif a * b < 0:
	if n % 2 == 0:
		print('No solution')
	else:
		y = abs(b) // abs(a)
		if abs(a * int(y ** (1 / n)) ** n) == abs(b):
			print(-int(y ** (1 / n)))
		else:
			print('No solution')
else:
	y = abs(b) // abs(a)
	if abs(a * math.ceil(y ** (1 / n)) ** n) == abs(b):
		print(math.ceil(y ** (1 / n)))
	else:
		print('No solution')


(A, B, n) = map(int, input().split())
for X in range(-1000, 1002):
	if A * pow(X, n) == B:
		break
print('No solution' if X > 1000 else X)


import math
wej = [int(i) for i in input().split()]
a = wej[0]
b = wej[1]
n = wej[2]
zliczenie = 0
for i in range(-1000, 1001):
	if a * i ** n == b:
		print(i)
		zliczenie += 1
		break
if zliczenie == 0:
	print('No solution')


def nik(rud, panda, pig):
	for i in range(-1000, 1002, 1):
		if rud * i ** pig == panda:
			print(i)
			break
	else:
		print('No solution')
(rud, panda, pig) = map(int, input().split())
nik(rud, panda, pig)


l = input().split(' ')
(a, b, n) = (int(l[0]), int(l[1]), int(l[2]))
if a == 0 and b != 0:
	print('No solution')
	exit()
elif a == 0 and b == 0:
	print(int(5))
elif b / a >= 0:
	if b / a == 1000 and n == 3:
		print(10)
	else:
		x = (b / a) ** (1 / n)
		if float(x).is_integer():
			print(int(x))
		else:
			print('No solution')
elif n % 2 == 0:
	print('No solution')
else:
	y = abs(b / a) ** (1 / n)
	if int(y) ** n * -1 == b / a:
		print(int(y * -1))
		exit()
	else:
		print('No solution')


(a, b, n) = map(int, input().split())
if b == 0:
	print(0)
elif a == 0 or b % a:
	print('No solution')
else:
	k = b // a
	if k < 0:
		x = -int((-k) ** (1 / n) + 0.0001)
	else:
		x = int(k ** (1 / n) + 0.0001)
	if x ** n == k:
		print(x)
	else:
		print('No solution')


(a, b, n) = map(int, input().split())
for x in range(-2000, 2000):
	if a * int(pow(x, n)) == b:
		print(x)
		exit()
print('No solution')


(a, b, n) = map(int, input().split())
if a == 0:
	if b == 0:
		print('0')
	else:
		print('No solution')
elif b % a != 0:
	print('No solution')
else:
	for i in range(-1000, 1001):
		if i ** n == b // a:
			print(i)
			exit()
	print('No solution')


from math import *
(a, b, n) = map(int, input().split())
if a * b < 0 and n % 2 == 0:
	print('No solution')
elif a == 0 and b != 0:
	print('No solution')
elif a == 0 and b == 0:
	print(0)
else:
	j = abs(b / a) ** (1 / n)
	if a * b < 0:
		j = -j
	if a * ceil(j) ** n == b:
		print(ceil(j))
	elif a * floor(j) ** n == b:
		print(floor(j))
	else:
		print('No solution')


(A, B, n) = map(int, input().split())
if A == 0 and B == 0:
	print(5)
elif A == 0:
	print('No solution')
elif B / A % 1 != 0:
	print('No solution')
else:
	v = B // A
	if v < 0:
		x = -1
	else:
		x = 1
	v = pow(abs(v), 1 / n)
	vv = round(v)
	if abs(vv - v) > 10 ** (-6):
		print('No solution')
	else:
		print(x * int(vv))


import sys
(a, b, n) = [int(x) for x in sys.stdin.readline().split()]
for t in range(-1000, 1001):
	if a * t ** n == b:
		print(t)
		exit()
print('No solution')


import math
(a, b, n) = map(int, input().split())
if a == b:
	print(1)
elif a == 0:
	print('No solution')
elif b == 0:
	print(0)
elif b % a != 0:
	print('No solution')
else:
	c = a
	d = b
	a = abs(a)
	b = abs(b)
	b = b / a
	if int(round(b ** (1.0 / n))) ** n == b:
		if c * d < 0:
			print('-', end='')
		print(int(round(b ** (1.0 / n))))
	else:
		print('No solution')


(a, b, n) = map(int, input().split())
out = 0
for i in range(-1000, 1001):
	x = i ** n
	if a * x == b:
		print(i)
		out = 1
		break
if out != 1:
	print('No solution')


import sys
import math
(a, b, n) = map(int, input().split())
for i in range(-1000, 1001):
	if a * i ** n == b:
		print(i)
		quit()
	elif i == 1000:
		print('No solution')


(a, b, n) = list(map(int, input().split()))
if a == 0 and b != 0 or (n == 0 and a != b) or (a != 0 and b / a < 0 and (n % 2 == 0)):
	print('No solution')
elif n == 0 or (a == 0 and b == 0):
	print(1)
else:
	z = 0
	for i in range(-abs(round(b / a)) - 1, abs(round(b / a)) + 1):
		if a * i ** n == b:
			z = 1
			print(i)
			break
	else:
		print('No solution')


import math

def is_Integer(val):
	if math.ceil(val) - X < 1e-09:
		return (True, math.ceil(X))
	elif X - math.floor(X) < 1e-09:
		return (True, math.floor(X))
	else:
		return (False, X)
(A, B, n) = [int(i) for i in input().split()]
ns = 'No solution'
if B == 0:
	X = 0
elif A and B:
	if B / A < 0:
		X = -math.pow(abs(B / A), 1 / n) if n % 2 == 1 else ns
	else:
		X = math.pow(B / A, 1 / n)
	if not X == ns:
		(F, X) = is_Integer(X)
		X = int(X) if F else ns
else:
	X = ns
print(X)