Project Euler #91: Right Triangles with Integer Coordinates

From HackerRank. Count right triangles on grid. Solve the geometry problem "Project Euler #91: Right Triangles with Integer Coordinates".

Examples
Input: [1,2,3]
Output: 0
Hints

Project Euler #91: Right Triangles with Integer Coordinates

**From HackerRank.** Count right triangles on grid. Solve the geometry problem "Project Euler #91: Right Triangles with Integer Coordinates".