Mr. Snow paid $4,330 for two investments. On one of them, he gained 12%, and on the other he lost 5%. If his net gain was $251, what was the amount of each investment?