Figured out xor the right way
Quick and dirty sieve solution