def get_brown(a,b): return (a+b)*2+4 def solution(brown, yellow): answer = [] for i in range(1,yellow//2+2): print(yellow//i,i) if(yellow%i==0)and(get_brown(yellow//i,i)==brown): return [yellow//i+2,i+2]