fixed an error message involving user input in 012 to correctly reflect the error.
changed the sqr function to be more sensible in the traingular factor checker