Given an integer N, check if it is possible to represent it as a function(a, b) such that : a^{2} + b^{2} = N where "a" and "b" are whole numbers. Print 1 if it's possible, else Print 0.

Example 1:

Input:N = 1Output:1Explanation:1^{2} + 0^{2} = 1. So, the Output is 1

Example 2:

Input:N = 2Output:1Explanation:1^{2} + 1^{2} = 2. So, the Output is 1

Example 3:

Input:N = 7Output:0Explanation:We don't have a or b, which when summed
after squaring gives 7. So, Output is 0.

Your Task:
You don't need to read input or print anything. Your task is to complete the function checkSquares() which takes an Integer N as input and returns the answer.

Expected Time Complexity: O(N) Expected Auxiliary Space: O(1)