If we consider a partition ${\mathcal X}=(X_1,\dots,X_n)$ of a finite set $X$ and a partition ${\mathcal Y}=(Y_1,\dots,Y_m)$ of another finite set $Y$, then $(X_i\times Y_j)_{i=1,...,n,j=1,...,m}$ is a partition of $X\times Y$. I will call this partition the "product partition" ${\mathcal X}\times{\mathcal Y}$.

On the converse, given a partition ${\mathcal Z}$ of a finite set $Z$ with finite cardinal $n=pq$ ($p$ and $q$ different from $0$ or $1$), how can one know if this partition is isomorphic to a non trivial product partition (i.e. if there exists two sets $X$ and $Y$ whose cardinals at least $2$ and endowed with partitions ${\mathcal X}$ and ${\mathcal Y}$ (respectively) and a bijection of $X\times Y$ on $Z$ such that the images of the elements of ${\mathcal X}\times{\mathcal Y}$ by this bijection are exactly the elements of ${\mathcal Z}$)?

In the very particular case where one knows that $Z$ is a finite commutative group and that ${\mathcal Z}$ is the set of classes $gH$ for some subgroup $H$ of $Z$, then using the classification of finite commutative groups, one obtains that ${\mathcal Z}$ is a product partition.

This question seems complicated (at least for me!) in the general case. Does someone know a partial answer to my question? In some particular case?