Solve for q r=6n+2q