# Show if a product of coprime numbers is a perfect square, so are the numbers - without FTA

I want to prove: $$\text{If }\gcd(a,b)=1\text{ and }ab=n^2,\text{ then }a,b\text{ are also perfect squares.}$$ Assume everyone is a positive integer, etc. Unless I'm deluding myself, this is pretty easy to show using unique prime factorization.

But I want to do it without using primes or the (usual statement of the) FTA. That is, using coprime is fine, using the so-called Bezout identity (XGCD algorithm), etc. is fine. Is this even possible without essentially defining at least irreducibles, if not primes and prime factorization, along the way?

(See here for a more vague question I asked a while ago on this.)

-
See my answer here which uses only properties of gcds. Note the in $\Bbb Z$ (or any domain where nonzero nonunits factor into irreducibles), the existence of gcds is equivalent to uniqueness of factorization into irreducibles, since it easily implies that irreducibles are prime. – Math Gems Jan 24 '13 at 20:10
A very related question: Let $R$ be a Bezout domain. If $a,b$ are coprime and $ab$ is a square, does it follow that $a,b$ are squares ? – Amr Jan 24 '13 at 20:21
@Amr Yes, Bezout domains are gcd domains, so the above-linked proof works. – Math Gems Jan 24 '13 at 20:24
@MathGems Yes I know. I was just telling the OP that this may be a better way to ask the question – Amr Jan 24 '13 at 20:32
@MathGems - nice, yes you are right about this. Maybe I should just be asking about Bezout domains instead - haven't thought about the tower of domains in years, thanks. I up-voted MathGems' earlier answer, best I could do here. – kcrisman Jan 24 '13 at 20:58