SMS dit: Pell's equation