#!/usr/bin/ python3.8 import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import itertools X, Y, Z = map(int, read().split()) F1 = [1, 0] F2 = [0, 1] for n in range(100): F1.append(F1[-1] + F1[-2]) F2.append(F2[-1] + F2[-2]) def solve(X, Y, Z): if X == Y == Z: if X == 1: yield 1, 1 return for f1, f2 in zip(F1[1:], F2[1:]): if f1 >= X: break if (X - f1) % f2 == 0: yield 1, X // f2 return X, Y, Z = sorted([X, Y, Z]) for i, k in itertools.product(range(100), range(100)): if i == k: continue num = F2[k] * X - F2[i] * Z den = F2[k] * F1[i] - F2[i] * F1[k] if num % den != 0: continue A = num // den num = X + Z - (F1[i] + F1[k]) * A den = F2[i] + F2[k] if num % den != 0: continue B = num // den if A <= 0 or B <= 0: continue seq = [A, B] for n in range(100): seq.append(seq[-1] + seq[-2]) if Y in seq: yield A, B answer = min(solve(X, Y, Z), default=None) if answer == None: print(-1) else: print(*answer)