Welcome to the Pell Equation solver: X2 - d × Y2 = ± 1
X2 - d × Y2 = ± 1
Examples of valid input: 67, 3**7+1, 2**2**3+1