A store is having a sale on almonds and jelly beans. For 5 pounds of almonds and 2 pounds of jelly beans, the total cost is $12. For 3 pounds of almonds and 8 pounds of jelly beans, the total cost is $31. Find the cost for each pound of almonds and each pound of jelly beans.