def inv_gcd(x,y): if y==0: return 1,0 r0,r1,s0,s1 = x,y,1,0 while r1 != 0: a,b = divmod(r0,r1) r0, r1, s0, s1 = r1, b, s1, s0-a*s1 return s0%y,r0 # s0*x + ??*y = r0 = gcd(x,y) def Chinese_remainder_theorem(r,m): assert len(r)==len(m) r0, M0 = 0,1 for r1, M1 in zip(r,m): if M0 < M1: r0,r1 = r1,r0 M0,M1 = M1,M0 minv,g = inv_gcd(M0,M1) Q,R = divmod(r1-r0,g) if R%g: return (0,0) M11 = M1//g r0 += Q%M11*minv%M11*M0 M0 *= M11 return r0,M0 def f(x): return ((x+a)*x+b)*x+c def g(x): return (((x+a)%p*x+b)%p*x+c)%p a,b,c = map(int,input().split()) res = [] primes = [100003, 100019, 100043] for p in primes: r = [] for i in range(p): if g(i) == 0: r.append(i) res.append(r) from itertools import product ans = [] P = 100003*100019*100043 for lst in product(*res): x = Chinese_remainder_theorem(lst,primes)[0] if f(x) == 0: ans.append(x) if f(x-P) == 0: ans.append(x-P) ans.sort() print(*ans)