T = int(input()) for i in range(T): H, W, D = map(int, input().split()) a = H*H+1 if H%2==1 else H*H b = W*W+1 if W%2==1 else W*W print('N' if D*D>=min(a,b) else 'S')