t = io.read("*n") z = {} z[0], z[45], z[90] = true, true, true for i = 1, t do a = io.read("*n") print(z[a] and "Y" or "N") end