Knowing that $n= 3598057$ is a product of two different prime numbers and that 20779 a square root of $1$ mod $n$, find prime factorization of $n$. 
Knowing that $n= 3598057$ is a product of two different prime numbers and that 20779 is a square root of $1$ mod $n$, find prime factorization of $n$.

What I have done so far:
$n = p \cdot q$
$x^2 \equiv 1\pmod{n}$
$x^2 -1 \equiv 0\pmod{n}$
$(x-1)(x+1) \equiv 0\pmod{n}$
$x-1 = 20779 \lor x + 1=20779$
I have also noticed that:
$(x-1)(x+1) \equiv 0\pmod{p \cdot q}$
$(x-1)(x+1) \equiv 0\pmod{p} \land (x-1)(x+1) \equiv 0\pmod{q}$
But I have no idea what to do next. Any hints?

From $(x-1)(x+1)\equiv 0 \pmod n$ you cannot conclude that $x-1 = 20779 \lor x + 1=20779$ when $n$ is not prime.  You can conclude that $x-1 \equiv 0 \pmod p$ and $x+1 \equiv 0 \pmod q$ (or the other way-we could swap $p,q$) when you know that $n$ has only two prime factors unless $pq$ divides one of $x+1, x-1$.  So factor $20778$ and $20780$ looking for factors that will multiply to make $3598057$.  The other factors are small enough to find by hand. 
