This got no response on MSE, so posting here.

Let $S = \{ (a,b) \in \Bbb{Z}^2 : \gcd(a,b) \neq 1 \} \cup (1,1)$. Then $S$ forms a semigroup. The operation being componentwise multiplication.

Let $R = \Bbb{Z}[x_1,\dots, x_4]$. Consider the set of all pairs of polynomials $p, q \in R$ such that $S$ is closed under $(a,b), (c,d) \mapsto (p(a,b,c,d), q(a,b,c,d))$ and such that $\gcd(a,b)\cdot\gcd(c,d)$ divides both $p(a,b,c,d), q(a,b,c,d)$.

Then that set of polynomials is $I \times I$ where $I$ is the ideal $x_1x_3 R + x_1x_4R + x_2x_3 R + x_2x_4R$.

If this is true, what can we say about $S$?

This might be interesting to someone studying Beal's conjecture which talks about triples, instead of pairs, of non-coprime integers.

$S$ seems to be the union of all ideals $p(\Bbb{Z}, \Bbb{Z})$ where $p$ is prime, (together with $(1,1)$).

*Proof*. $p(\Bbb{Z}, \Bbb{Z}) \subset S$ clearly, and conversely if $\gcd(a,b) \neq 1$, then there is a prime $p$ dividing $(a,b)$.