. . in lieu of having more information, it's impossible to give you an accurate diagnosis since keeping two snakes together isn't sufficient to cause death in itself.
If these are the first two snakes you have that mysteriously died, you DO have reason to be nervous. Phorid or carion flies are carriers of everything. Of course, this means carriers of something bad. They feed on the part of waste and/or regurgitations that carry all the "nasties" of the animal world. Namely, but not limited to shoughed parasites and their ooycists. When the flies feast on this mess, they pick these up and even if they're not intermediary hosts for the parasite, they can transport the problem to the next cage and create a potential for contamination.
It's time for you to consider a qualified reptile vet. Even a dog and pony vet can tell you what you're dealing with and recommend treatment. If you refrigerated (not froze) one of the dead animals, get it to a vet immediately and have it examined. If that wasn't done, get a fresh stool sample from one of the other snakes for them to examine.
Again, without more environmental data, it's impossible to say what caused this, but "yes" you should be concerned if not worried.
Best wishes,
Don
www.cornsnake.NET
South Mountain Reptiles