There are chicken and rabbits on a farm. You count 98 legs and your friend counts 30 heads. How many chickens and how many rabbits are there?