We are still with squared integers.

Given 4 integers `a, b, c, d` we form the sum of the squares of `a` and `b`
and then the sum of the squares of `c` and `d`. We multiply the two sums hence a number `n` and we try to
decompose `n` in a sum of two squares `e` and `f` (e and f integers >= 0) so that `n = e² + f²`. 

More: `e` and `f` must result only from sums (or differences) of products between on the one hand `(a, b)` and on the other `(c, d)` each of `a, b, c, d` taken only once. 
For example, 
prod2sum(1, 2, 1, 3) should return [[1, 7], [5, 5]]) 
because 
```
1==1*3-1*2
7==2*3+1*1
5==1*2+1*3
```
Suppose we have `a = 1, b = 2, c = 1, d = 3`. First we calculate the sums 
`1² + 2² = 5 and 1² + 3² = 10` hence `n = 50`.



`50 = 1² + 7² or 50 = 7² + 1²` (we'll consider that these two solutions are the same)
or `50 = 5² + 5²`. 

The return of our function will be an array of subarrays (in C an array of Pairs) sorted on the first elements of the subarrays. In each subarray the lower element should be the first.

`prod2sum(1, 2, 1, 3) should return [[1, 7], [5, 5]]`

`prod2sum(2, 3, 4, 5) should return  [[2, 23], [7, 22]]`

because `(2² + 3²) * (4² + 5²) = 533 = (7² + 22²) = (23² + 2²)`

`prod2sum(1, 2, 2, 3) should return  [[1, 8], [4, 7]]`

`prod2sum(1, 1, 3, 5) should return  [[2, 8]]` (there are not always 2 solutions).

##Hint
Take a sheet of paper and with a bit of algebra try to write the product of squared numbers in another way.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

def _disabled_input(*args, **kwargs):
    raise RuntimeError("input() is disabled in callable mode")
builtins.input = _disabled_input

ns = {"__name__": "__judge__"}  # prevent if __name__ == "__main__" blocks
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'def as_pair(z):\n    pos_int = lambda x: abs(int(x))\n    return sorted( map(pos_int, [z.real, z.imag]) )\n\ndef prod2sum(a, b, c, d):\n    z = complex(a,b)\n    w = complex(c,d)\n    results = list(map(as_pair, [z * w,  z * w.conjugate()]))\n    if results[1]==results[0]:\n        results.pop()\n    return sorted(results)\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

_target = None
_fn_name = 'prod2sum'
if _fn_name:
    if "Solution" in ns:
        try:
            _obj = ns["Solution"]()
            if hasattr(_obj, _fn_name):
                _target = getattr(_obj, _fn_name)
        except Exception:
            _target = None
    if _target is None and _fn_name in ns and callable(ns[_fn_name]):
        _target = ns[_fn_name]
# Fallback: if there's exactly one user-defined function, use it
if _target is None:
    _cands = [v for k, v in ns.items() if callable(v) and getattr(v, "__module__", "") in ("__judge__", "__main__")]
    _user_funcs = [c for c in _cands if getattr(c, "__name__", "").startswith("_") is False]
    if len(_user_funcs) == 1:
        _target = _user_funcs[0]
if _target is None:
    raise RuntimeError(f"Could not resolve callable '{_fn_name}'")

_raw = sys.stdin.read().strip()
if _raw:
    _parsed = json.loads(_raw)
    if isinstance(_parsed, dict):
        _kwargs = _parsed.get("kwargs", {})
        _args = _parsed.get("args", [])
    else:
        _args, _kwargs = _parsed, {}
else:
    _args, _kwargs = [], {}
if not isinstance(_args, (list, tuple)):
    _args = [_args]
_res = _target(*_args, **_kwargs)
try:
    sys.stdout.write(repr(_res) + "\n")
except Exception:
    pass

```

Measured memory_bytes: 6668