A farmhouse shelters 27 animals. Some are rabbits and some are ducks. Altogether there are 94 legs. How many of each animal are there?