t = int(input()) for i in range(t): n = int(input()) if n == 0 or n == 45 or n == 90:print("Y") else:print("N")