Problem A
References |
Problem B
Sum of powers |
Problem C
Game |
Problem D
Crossword |
Problem E
Magic of David Copperfield |
Problem F
Puncher |
Problem G
Flying Stars |
Problem H
Divide et unita |
Input file | INPUT.TXT |
Output file | OUTPUT.TXT |
Time-limit/Test | 10 seconds |
However, sometimes it is not possible to distinguish tickets that are perforated by different punchers. Let us assume that while punching two opposite borders of the ticket are parallel to the rows of the needles, the other pair of opposite borders being parallel to the columns of the needles. The number of the holes in a perforated ticket is always equal to the number of the needles in the corresponding puncher. A composition of the following transformations is allowed:
Input
The input file consists of two positive integer numbers M (not greater than 4) and N (not greater than 8) separated by a single space.
Output
The output file consists of a single integer indicating the number of the actually different punchers.
Sample input
3 3Output for the sample input
85