solved problem 13
solved problem 14, albeit brute forced it