Consider a rectangle ABCD having 5, 7, 6, 9 points in the interior of the line segments AB, CD, BC, DA respectively. Let be the number of triangles having these points from different sides as vertices and be the number of quadrilaterals having these points from different sides as vertices. Then ( ) is equal to :