Determine the number of ways of choosing three points from the grid below, so that they form an isosceles right triangle.