You need to buy 8 packages of meat for a cookout. A package of hot dogs costs $2.19 and a package of hamburgers costs $5.89. You spend a total of $28.62. Write a system of equations and solve to find the number of packages of each type of meat purchased.​