$(x,y) \in \mathbb Z \times\mathbb Z$ with $336x+378y=\gcd(336,378)$ $(x,y) \in \mathbb Z \times\mathbb Z$ with $336x+378y=\gcd(336,378)$
Question: How can I get every possible combination of $x$ and $y$?
My solution so far: 
First I have calculated the $\gcd(336,378)=42$.
So using that I have $42= 1\cdot378-1\cdot336$
So $x=1$ and $y=-1$.
To get the general formula I have tried two things with gcd and lcm as a factor:
gcd:
$42=1 \cdot 42 \cdot x \cdot 378- 1 \cdot 42 \cdot x \cdot 336, x \in \mathbb Z$
lcm:
$42=1 \cdot 3024 \cdot x \cdot378 - 1 \cdot 3024 \cdot x, x\in \mathbb Z$
Unfortunately both do not make sense - it was just a guess. 

Let's look for integers $u,v$ such that 
$$(1+u)\cdot 336+(-1+v)\cdot 378=42$$
Expanding and cancelling by $42$, we want
$$8u+9v=0$$ 
Can you see how to find all solutions now?
