SP10312 CONCAVE - Concave quadrilaterals

Description

Given is a grid consisting of _r_ rows by _c_ columns of grid points. Count the number of ways in which it is possible to draw a strictly concave quadrilateral with vertices in four of the given grid points. (A quadrilateral is strictly concave if and only if one of its two diagonals contains a point that is strictly outside the quadrilateral. Shifted and/or rotated copies of the same quadrilateral count as distinct ways of drawing it.)

Input Format

N/A

Output Format

N/A