T = int(input()) for _ in range(T): h,w,d = map(int,input().split()) if (h<=d and h%2==0) or (w<=d and w%2==0) or ((h+1)**2<=d**2) or ((w+1)**2<=d**2): print('N') else: print('S')