Let F p be the field with p elements with p prime, X 1 , . . . , X n pairwise disjoint subsets of F p with at least 3 elements such that n i=1 |X i | ≤ p−5, and S n the set of permutations of {1, 2, . . . , n}. If a 1 , . . . , a n ∈ F p * are not all equal, we characterize the subsets X 1 , . . . , X n which satisfyThis result has the following application: For n ≥ 2, b ∈ F p and a 1 , . . . , a n as above, we characterize the colorings n i=1 C i = F p where each color has at least 3 elements such that n i=1 a i x i = b has not rainbow solutions.