Ad

Given a and b, n is the sum of the squares of a and b. e.g. (a,b)=(1,2)-->n=5

Break 2n into a sum of two squares and output!
e.g.2n=10-->(a,b)=(1,3)
(yes it is always possible :)

Think before you code!Good luck!

using namespace std;
pair<int, int> two_squares(int a,int b){
  return make_pair(b-a,a+b);
}