Solver for 2 SAT problem