Solved problem 8, brute force only for now