For her digital camera, Judy Ackerman purchased a 512-mb memory card and a 4-GB memory card. Together the two memory cards can store a total of 996 photos. The 4-GB memory card can store 15 more than eight times the number of photos the 512-MB memory card can store. How many photos can each memory card store?