City
题号:NC201087
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Hi ICPCer, welcome to Xi'an.
Being a beautiful ancient city, Xi'an is the capital city of Zhou, Qin, Han, and Tang Dynasties. With a long history, the streets in Xi'an have a grid pattern.
Attracted by the streets' structure, Coach would like to conduct his research on them. He draws an grid on the board. The grid consists vertical line segments and horizontal line segments. The vertical and horizontal line segments intersect at exactly points, forming unit squares. We call the intersections s. Output the number of line segments(not only vertical or horizontal) satisfying the following three conditions:
1.The length is not zero.
2.Both endpoints of are grid points.
3.The midpoint of is a grid point.

输入描述:

The only line contains two integers ().

输出描述:

Print the answer in a single line.
示例1

输入

复制
1 1

输出

复制
0
示例2

输入

复制
2 3

输出

复制
14