Need help with the proof {needed for my algorithm} I am not from pure math background.
I am working on an algorithm which works good for all the practical reasons
based on the following assumption. 
that,
if 
ab = cd
and a+b = c+d 
then, either a = c & b = d or 
a = d & b = c. where, $a,b,c,d$ $\in$ $\mathbb{Z}$ 
I am not sure if this is true in the all conditions, but if it's can anyone provide proof, why ? 
Thanks in advance.
Addition -1 : 
Is this also true for pair of N numbers ? 
Addition -2 (Answer for the above)
- I think I got it, @saulspatz's proof can be generalized (already sufficient),
we can say,
After proof since, $a = c $ & $b = d$ 
then, by saying
$b = b1 + b2$ and $c = c1 + c2$ proof can be further generalized for the addition and multiplication of pair of $N$ such numbers.  
$a1, a2,...aN \in \mathbb{Z}$
$b1, b2,....bN  \in \mathbb{Z} $ 
 A: Only an idea: if $$a+b=c+d$$ we get by squaring
$$a^2+b^2=c^2+d^2$$ since $$ab=cd$$ so we get
$$a^2-c^2=d^2-b^2$$ or $$a^2-d^2=b^2-c^2$$
A: Let $a+b=n=c+d$.  Then $$ab=cd\implies a(n-a)=c(n-c)$$ so that $$an-a^2=cn-c^2,$$ or$$(a-c)n=a^2-c^2=(a-c)(a+c)$$
Either $a-c,$ and we are done, or $a-c\ne 0$ so we can cancel the $a-c$ to get $$n=a+c$$
Together with $n=aa+b$ this gives $b=c.$
In short, your assumption is correct.
A: This is true.
In general, $r$ and $s$ are the two roots of the quadratic equation
$$
x^2 -(r+s)x + rs = (x-r)(x-s).
$$
so knowing the sum and the product determines the values (up to swapping them).
A: Let $\exists \delta_1, \delta_2 \in \mathbb{Z}$ such that $c = a + \delta_1, d = b + \delta_2$ and $(\delta_1,\delta_2) \neq (0,0)$. However from $a+b=c+d$ it follows that $\delta_1 = -\delta_2$. Now $ab = cd = (a+\delta_1)(b-\delta_1)$, then $\delta_1^2 + (a-b)\delta_1 = \delta_1(\delta_1+a-b) = 0$. Since we assumed $\delta_1 \neq 0$ it follows that $\delta_1 = b-a$, however then we get $c = b, d=a$. Thus it necessarily holds that for the given constraints either $(a,b) = (c,d)$ which corresponds to $\delta_1 = 0$, or $(a,b)=(d,c)$ which corresponds to $\delta_1 = b-a$. Note that this is true for $a,b,c,d \in \mathbb{R}$.
Edit:
Since the original question was extended through an edit, I'll address that also.
If you have more variables you need more equations, for example:
$$a,b,c,d,e,f \in \mathbb{R}$$ $$a+b+c = d+e+f$$ $$ab + bc + ac = de + ef + df$$ $$abc=def$$ 
