SP10437 IOPC1202 - Quadrilaterals

Description

You are given the coordinates of the vertices of a square in the 2-d plane. All vertex coordinates will be integers. Now consider all convex quadrilaterals which also have integer coordinates for their vertices such that the midpoints of their edges are the vertices of the original square. Find the sum of areas of all such quadrilaterals.

Input Format

The first line of input gives T, the number of test cases (1

Output Format

For each testcase output the total area of quadrilaterals with the given property. Since the answer could be very large, give the answer modulo 100000007.