  Let $m\leq n$ be positive integers and $\mathfrak X$ a class of groups which
is closed for subgroups, quotient groups and extensions. Suppose that a finite
group $G$ satisfies the condition that for every two subsets $M$ and $N$ of
cardinalities $m$ and $n,$ respectively, there exist $x \in M$ and $y \in N$
such that $\langle x, y \rangle\in \mathfrak X.$ Then either $G\in \mathfrak X$
or $|G|\leq \left(\frac{180}{53}\right)^m(n-1).$
