completed problem 58. cool way to do primesw