A Compositional Neural Network Solution to Primality-Testing