Q=int(input()) for _ in range(Q): N,X=map(int,input().split()) score=N*(N+1)//2 if X=X: r=m else: l=m+1 if l==r: break result.append(l) X-=l result.append(X) print(*result)