n and m are positive integers that satisfy n^3+2n^2=m^2. If 1≤n≤1000, how many possible pairs of (n,m) are there?