I found this exercise in a book but I would like to know how to do this kind of questions.

Let P= P(x_1,x_2,...,x_n) be apolynomial in n variables over an arbitrary field F.Suppose that the degree of P as apolynomial in x_i is at most t_i for i bigger than or equal to 1 and less than or equal to n , and let S_i is contained in F be a set of at least t_i +1 distinct members of F. If P(x_1,x_2,...,x_n) = 0 for all n-tuples (x_1,x_2,...,x_n) belong to S_1 x S_2 x ...x S_n , then P=0.