05AB1E, 8 8 6 bytes
Åœ2ùŲPàÝãnOIå
Try it online Bugfixed and -2 bytes thanks to @Mr.Xcoder, making it now similar as @emanresuA's Vyxal answer and @cairdCoinheringaahing's Jelly answer.
Try it online or verify the smaller test casesverify the smaller test cases.
Explanation:
Åœ Ý # Get all lists ofPush positivea integerslist thatin sumthe torange the[0, (implicit) inputinput]
2ùã # OnlyCreate keepall thepossible pairs
Ų # Check for each number whetherwith it'sthe acartesian squareproduct
n P # Product: check forSquare each pair if both are truthyinteger
O # (the empty list will also result in truthy forSum n=0each andinner n=1)pair
àIå # Max: checkCheck if any in thethis list is truthy
contains the input
# (after which the result is output implicitly)