While visiting a friend's home, I saw kittens and chickens playing in the backyard. Counting heads, I got 18. Counting feet, I got 50. How many kittens and how many chickens were in the backyard?