A package of 4 mechanical pencils comes with 2 free erasers. If you get a total of 12 free erasers, how many packages of pencils did you buy? If you get 18 free erasers,how many packages of pencils did you buy?