A farmer has two types of livestock: goats and sheep. He needs to figure out how many of each type he has. If he counts a total of 100 animals and knows that the total number of legs is 280, how many goats and sheep does the farmer have, assuming each goat has 4 legs and each sheep has 4 legs? Let's think step by step and output the final answer within \boxed{}.
user