t = int(input()) for i in range(t): h,w,d = map(int,input().split()) if h%2 == 0 and w % 2 == 0: need = min(h**2,w**2) if h%2 == 0 and w % 2: need = min(1+h**2,w**2) if h%2 and w % 2 == 0: need = min(h**2,1+w**2) if h%2 and w % 2: need = min(1+h**2,1+w**2) if need <= d**2: print("N") else: print("S")