#!/usr/bin/python
import sys

def compute(prey, otherHunter, dist):
	if prey[1] != 0:
		temp0 = dist % prey[1]
	else:
		temp0 = prey[1]
	temp1 = prey[0] - dist
	temp2 = prey[0] + dist
	if temp0 != 0:
		temp3 = otherHunter[1] % temp0
	else:
		temp3 = temp0
	return [ temp0 , dist ]
