Two died due to factory fire