{"trustable":false,"sections":[{"title":"","value":{"format":"PLAIN","content":"You probably know how the game of chess is played. The chess queen is an unique piece. Two chess queens can attack each other when they are on the same row, column, or diagonal of a chessboard. Suppose two such chess queens (one black and the other white) are placed on (2 × 2) chessboard. They can be in attacking positions in 12 ways, these are shown in the below: \n\nWB | BW | .. | .. | W. | B. | .W | .B | W. | B. | .W | .B\n.. | .. | WB | BW | B. | W. | .B | .W | .B | .W | B. | W.\n\nGiven an (N × M) board you will have to decide in how many ways 2 queens can be in attacking position in that. "}},{"title":"Input","value":{"format":"PLAIN","content":"The input file can contain up to 5000 lines of inputs. Each line contains two non-negative integers which denote the value of M and N (0 \u003c M, N ≤ 1,000,000) respectively. Input is terminated by a line containing two zeroes. These two zeroes need not be processed. \n"}},{"title":"Output","value":{"format":"PLAIN","content":"For each line of input produce one line of output. This line contains an integer which denotes in how many ways two queens can be in attacking position in an (M × N) board, where the values of M and N came from the input. All output values will fit in 64-bit signed integer. \n"}},{"title":"Sample Input","value":{"format":"PLAIN","content":"2 2 \n100 223 \n2300 1000 \n0 0 \n"}},{"title":"Sample Output","value":{"format":"PLAIN","content":"12 \n10907100 \n11514134000"}}]}