TITLE: Find the sides of the triangle.
QUESTION [5 upvotes]: The triangle with sides $8-15-13$ has a $60^{\circ}$ angle. The triangle with sides $11-35-31$ also has a $60^{\circ}$ angle. Find a triangle $x-y-403$ where $x$ and $y$ are relatively prime positive integers and the angle opposite the side of length $403$ is $60^{\circ}$ angle.
I have been trying this problem but doesn't get the solution. I am unable to find how I can use the given info to solve this. 
Is the given information sufficient to solve the problem?
If yes, can anybody please tell me how I can use them.
Thanks in advance.

REPLY [2 votes]: We are looking for the integer solutions of $ \frac{x^2+y^2-403^2}{2xy}=\frac{1}{2}$ or
$$ x^2-xy+y^2 = 403^2 = 13^2\cdot 31^2.\tag{1} $$
It is crucial to point out that the LHS of $(1)$ is the norm on the Euclidean domain $\mathbb{Z}[\omega]$ (the ring of Eisenstein integers) that is a unique factorization domain. $31$ splits as $(6+\omega)(6+\omega^2)$ and $13$ splits as $(4+\omega)(4+\omega^2)$, hence the solutions of $(1)$ over the positive integers, with $x\leq y$, are given by:

$$(x,y)\in\color{red}{\left\{( 403 , 403 ), 
( 80 , 437 ), 
( 357 , 437 ), 
( 115 , 448 ) ,
( 333 , 448 ) ,\\
( 143 , 455 ) ,
( 312 , 455 ) ,
( 217 , 465 ) ,
( 248 , 465 )
\right\}}\tag{2} $$