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