Mr. Lin is angry.

TimeLimit:1000MS  MemoryLimit:128MB
64-bit integer IO format:%lld
未提交 | 登录后收藏
Problem Description

Mr.Lin was preparing to bully the employee JQ on this day. He caught JQ to play gobang with him. Because of Mr.Lin was too weak, he lost several gobang. Finally, Mr.Lin was so angry. He took a knife and cut off each side of the board . Now the question is coming. How many cases have Mr.Lin cut the chessboard into squares and rectangles?

计算n*m的棋盘里面包含多少个正方形,多少个长方形


because of 我不知道咋在样例弄图片,所以

the sample like this

image.png


and we get answer  have two squares and one rectangle such as

 


image.pngimage.pngimage.png


Input

There multiple test cases in the input (more than 1e5)

each test case contains two positive integers n, m stand for the length and width of chessboard.

Input data Guarantee less than 2^63


Output

One line for each test case

Two integers indicates the number of squares and the number of rectangles

Output data Guarantee less than 2^63


SampleInput
1 2
SampleOutput
2 1
Submit
题目统计信息详细
总AC数11
通过人数11
尝试人数17
总提交量40
AC率27.50%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: