In the previous answer I mentioned that b should have prime divisors of the form 4k+3 when it should actually be 4k+1.
and,2013 = 3*11*61.
@Swarna Kamal Dhyawala:Thanks for rectifying the mistake.
2013 = 20*12*2013
Here m=0, a =1, and b =2013 = 3*11*61
Since all the prime divisors of b are not of the form 4k+1,it cannot be written as a sum of 2 squares.
@Soumyabrata Mondal: If the number is prime it would mean that m =0,a =1 and b is a prime.
Now if b is not of the form 4k+1 it cannot be written as a sum of 2 squares.Otherwise Solutions to x and y exist.