Other two vertices will make two right angled triangles with AB as the common hypotenuse. So they must lie on the circle with AB as the diameter and O as the centre. Radius of that circle will be 5 units. There will be 5 such pairs in which both the coordinates are integers. [(5,0), (-5,0)] , [(-4,3), (4,-3)] , [(-3,4), (3,-4)] , [(-3,-4),(3,4)] and [(0,5), (0, -5)]