Solving the N-Queens problem using a SAT solver