Leslie bought 7 packages total of AA and AAA, AA has 6 batteries in each package and AAA has 8 batteries in each package, she ended up with 52 batteries in total. How many packages or AA and AAA did she buy?