There is an $n\times n$ chessboard with an even positive integer $n$. We put all the numbers $1,2,...,n^2$ into the squares of the chessboard, where each number appears once and only once and each square has one and only one number. The sum of the numbers put in the black squares is $B$ and the sum of the numbers put in the white squares is $W$.
Find all $n$ so that we can achieve $ \frac{B}{W}=\frac{39}{64}$.