A wedding planner purchased both small and large lanterns for a wedding reception. The planner purchased a total of 40 lanterns for a purchase price of $1180. How many of each size lantern did the planner purchase?