Pick[#, (#^2).{1, 1, -1}, 0] &@Tuples[Range[100], 3]