Driver code
public static void Main ( String [ ] args ) { List < pair > points = new List < pair > ( ) ; points . Add ( new pair ( 1 , 1 ) ) ; points . Add ( new pair ( 2 , 2 ) ) ; points . Add ( new pair ( 3 , 3 ) ) ; int n = points . Count ; Console . WriteLine ( countTriplets ( n , points ) ) ; } }