Statement
Coco has a bunch of interestingly shaped white and dark chocolate pieces. White chocolates are unit square pyramids, and dark chocolates are unit triangular pyramids. One day, Coco observed that he can stack these chocolate pieces to get larger pyramidal shapes. In particular, the following is a way to stack a pyramid with an rectangle as its base.
- First, fill the floor with white chocolate pieces.
- Fill the gaps between the white chocolate pieces with dark chocolate pieces.
- Fill the remaining gaps with upside-down white chocolate pieces. At this point, the upper face is a rectangle of size .
- Repeat 1-3 until the area of the upper face becomes .
The picture below describes the process of stacking the first floor of a pyramid. It takes 8 white and 7 dark chocolate pieces to form the first floor, and 10 and 8 respectively for the whole pyramid.
Coco wants to build a very large pyramid and give it to Hanbyeol as a gift. Calculate how many white and dark chocolate pieces Coco will need.
Input
The first line contains the number of test cases . ()
Over the next lines, each line contains and separated by a space. ()
Output
For each test case, output the number of white and dark chocolate pieces on one line, separated by a space.