Property kept under base change and composition is preserved by products

The following is true? Why?

Let $P$ be a property of morphisms preserved under base change and composition. Let $X\to Y$ and $X'\to Y'$ be morphisms of $S$-schemes with property $P$. Then the unique morphism $X\times_S X' \to Y\times_S Y'$ has property $P$.

-
Of course this has nothing to do with schemes. – Martin Brandenburg Feb 16 '13 at 18:39
Thank you for the nice hint. – Tom Feb 17 '13 at 0:42

The canonical morphism $X\times_S X'\to Y\times_S Y'$ is the composition of $X\times_S X'\to Y\times_S X'$ and $Y\times_S X'\to Y\times_S Y'$. The latter verify property P because they are obtained by base change (the first one is $X\to Y$ base changed to $Y\times_S X'$, the second one is similar). As P is stable by composition, your canonical morphism satisfies P.