May too brute force. May not work.
A bit quicker, but still brute force
Another try, using a poor implementation of a sieve
Super slow, but worked