A farmer has cows and chickens . He only sees 50 legs and 18 heads . How many are cows and how many are chickens?