#include <stdio.h>
#define MAX(x, y) ((x) > (y) ? (x) : (y))
int main(void)
{
int x, y, z;
for (y = 1; y < 9; y++)
{
for (x = 1; x < 9; x++)
{
z = MAX(MAX(x, y) / 2, (x + y) / 3);
z += x + y + z & 1;
z += (x + y == 3 || x == y && (x | y | 1) == 3) * 2;
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNkZWZpbmUgTUFYKHgsIHkpICgoeCkgPiAoeSkgPyAoeCkgOiAoeSkpCgppbnQgbWFpbih2b2lkKQp7CiAgaW50IHgsIHksIHo7CiAgZm9yICh5ID0gMTsgeSA8IDk7IHkrKykKICB7CiAgICBmb3IgKHggPSAxOyB4IDwgOTsgeCsrKQogICAgewogICAgICB6ID0gTUFYKE1BWCh4LCB5KSAvIDIsICh4ICsgeSkgLyAzKTsKICAgICAgeiArPSB4ICsgeSArIHogJiAxOwogICAgICB6ICs9ICh4ICsgeSA9PSAzIHx8IHggPT0geSAmJiAoeCB8IHkgfCAxKSA9PSAzKSAqIDI7CiAgICAgIHByaW50ZigiJTJkIiwgeik7CiAgICB9CiAgICBwdXRzKCIiKTsKICB9CiAgcmV0dXJuIDA7Cn0K