def solution(brown, yellow):
answer = []
mul = brown + yellow
for i in range(1, mul):
if mul % i == 0:
if (i - 2) * ((mul / i) - 2) == yellow:
if (i < mul / i):
answer = [int(mul / i), i]
else:
answer = [i, int(mul / i)]
return answer
else:
continue
else:
continue
brown = 10
yellow = 2
print(solution(10,2))