A hospital received a shipment of 8-milligram doses of medicine. Each 8-milligram package was repacked into two smaller doses of un-equal size and labeled packet A and packet B. The hospital then used 17 doses of packet A and 14 doses of packet B in one week. The hospital used a total of 127 milligrams of the medicine during that week. How many milligrams of the medicine are contained in each A packet? How much in each B packet?