A grocery store recently sold a bag of peanuts for $0.76 and a bag of pistachios for $3.68. At the end of that day, 50 bags of peanuts and pistachios were sold for a total of $128.52. How many bags of each were sold?