12 is the length of the shortest leg in a right-angled triangle with hypotenuse length 20: 202=162+122 and also in the right triangle with hypotenuse length 37: 372=352+122. So there are two right triangles.
If we take just two of the numbers from 12, 16, 20, 35, 37, we can create a right angle with any two of these numbers as the lengths of two lines. That means we can form 10 right angles. Two of these combinations include the two right triangles mentioned earlier.
We can use all 5 numbers by assembling a triangle with sides 37, 20, 51 where 51=35+16 forming the longest side and the the perpendicular from the largest angle on to the opposite side has length 12. In this figure the two triangles mentioned earlier are back to back with the common side length 12. Both right angles appear in this single figure.