a,b,c = map(int,input().split())
flag = 0
dic = {}
for i in range(1,c):
if a//i ==1 or b//(c - i) == 1:
continue
if a % i == 0 and b % (c - i) == 0:
flag = 1
dic[abs((a//i)-b//(c - i))] = i,c-i
if flag == 1:
dic = sorted(dic.items(),key=lambda x : x[0])
print(*dic[0][1])
else:
print("No Solution")
7-17 分寝室
最新推荐文章于 2024-11-15 23:33:54 发布