$p^2$ divides $ab$ and $\gcd(a,b)=1$. Show $p^2$ divides $a$ or $p^2$ divides $b$ Suppose $p$ is a prime where  $p^2 \mid ab$ and $\gcd(a,b) = 1$. Show that $p^2\mid a$ or $p^2 \mid b$. 
I'm not quite sure how to go about this. I know it has something to do with the fact that $\gcd(a,b) = 1$ since if we didn't have that requirement, this statement would not hold since $3^2 \mid 6*12$ but $3^2$ does not divide $6$ or $12$. 
I started by saying that since $p^2  \mid ab$, $ab = p^2k$ for some integer $k$. Also since $\gcd(a,b) = 1$, $1 = ax + by$. 
I do not know if this is the right way to think about this or not. Any help would be great. 
 A: Try to write out $a$ and $b$ in terms of their prime factorizations and work from $ab = p^2k$. Due to this equation there should exist two factors of $p$ on the left side. It is impossible for you to get this as a $p$ from each of $a$ and $b$ for then they wouldn't be relatively prime ($\gcd(a,b) = 1$). Therefore, the $p^2$ must come exclusively from either $a$ or $b$.
A: By Euclid, prime $\,p\mid ab\,\Rightarrow\,p\mid a\,$ or $\,p\mid b;\,$ wlog $\,p\mid b\,$ so $\, np^2 = ab\,\Rightarrow\, np= a(b/p).\,$ Again, by Euclid, $\,p\mid a\,$ or $\,p\mid b/p.\,$ But if $\,p\mid a\,$ then $\,p\mid a,b,\,$ contra $\,a,b\,$ coprime. Thus $\,p\mid b/p,\,$ so $\,p^2\mid b.$
Alternatively, compare the unique prime factorizations of $\, np^2 = ab,\,$ using $\,a,b\,$ coprime.
A: Suppose that $p^{2}$ does not divide $a$ nor $b$.Then $p$ cannot be a common divisor of $a$ and $b$. Hence, there exists $x, y$ such that $p^{2}x + ay = 1$ or $p^{2}s + bt = 1$.
Considering $bp^{2}x + aby = b$ or  $ap^{2}s + abt = a$ we get a contradiction. 
