Grandma bought a chocolate bar for her four grandchildren. The bar is made up of small chocolate squares arranged as a grid of rows and columns. The grandchildren are all of different ages, and Grandma’s rule is simple: the older the child, the more chocolate they get. To share the entire bar without waste, she wants to split it into four rectangular pieces with pairwise distinct numbers of squares.
Grandma knows that snapping a chocolate bar by hand can be irregular. To ensure clean cuts, after placing the bar flat on a cutting board she will make two straight cuts with a knife along the grooves between squares: one horizontal cut between rows and (), and one vertical cut between columns and (). Each cut crosses the entire bar.
In the picture below, a chocolate bar with and is cut by choosing and , which yields pieces with , , and squares.
Help Grandma choose where to cut: find a pair of integers and such that the four resulting pieces have pairwise distinct numbers of squares, or determine that no such pair exists.
The input consists of a single line that contains two integers and (), indicating respectively the number of rows and columns of the chocolate bar.
Output a single line with two integers and , indicating where the chocolate bar can be cut to obtain four pieces with pairwise distinct numbers of squares. If there are multiple solutions, output any of them.
If four pieces with distinct numbers of squares cannot be obtained,
output a single line with the character “*” (asterisk)
instead.
5 7
2 3
5 7
2 4
2 2
*