eolymp
bolt
Try our new interface for solving problems
Problems

Letter of postman Pechkin

Letter of postman Pechkin

Time limit 0.5 seconds
Memory limit 64 MiB

Dear children!

Watching the dog (Cartoon character) sawn custom chess board, I also decided to give you a puzzle: How many different squares and rectangulars (not counting the square ones) boards could be obtained by the dog from a s non-standard rectangular chessboard of size MxN?”

Input data

In the first line number of postman Pechkin tasks K, in the subsequent rows K of two integers M and N (1K, M, N 100), separated by a space.

Output data

For each example, given Pechkin, display in a separate line in the desired amount of space at first square, then rectangular boards.

Examples

Input example #1
1
3 2
Output example #1
8 10
Source Stage III All-Ukrainian Olympiad 2009-2010 Zhitomir