Fundamental Solution of the Pell Equation
Piet, 612 codels
Takes n from standard input. Outputs y then x, space-separated.
Codel size 1: 
Codel size 4, for easier viewing: 
Explanation
Check out this NPiet trace, which shows the program calculating the solution for an input value of 99.
I'm not sure whether I'd ever heard of Pell's equation before this challenge, so I got all of the following from Wikipedia; specifically, these sections of three articles:

Pell's equation § Fundamental solution via continued fractions
Methods of computing square roots § Continued fraction expansion
Continued fraction § Infinite continued fractions and convergents

Basically, what we do is this:

Get \$n\$ from standard input.
Find \$\lfloor\sqrt n\rfloor\$ by incrementing a counter until its square exceeds \$n\$, then decrement it once. (This is the first loop you can see in the trace, at top left.)
Set up some variables for calculating \$x\$ and \$y\$ from the continued fraction of \$\sqrt n\$.
Check whether \$x\$ and \$y\$ fit Pell's equation yet. If they do, output the values (this is the downwards branch about 2/3 of the way across) and then exit (by running into the red block at far left).
If not, iteratively update the variables and go back to step 4. (This is the wide loop out to the right, back across the bottom, and rejoining not quite halfway across.)

I frankly have no idea whether or not a brute-force approach would be shorter, and I'm not about to try it! Okay, so I tried it.