A farmer has a total of 56 chickens and cows on his farm. He knows the total number of legs of all his animals is 154. How many chickens and how many cows does the farmer have? Let's think step by step and output the final answer within \boxed{}.
user