Kingdomino Tilings

Kingdomino Tilings

One of the element of boardgame Kingdomino is placing tiles (2x1) near the castle (1x1) or near another tile in such a way that total size of the field is no more than 5x5. One of the possible tilings is shown below.

example

As you may expect, some tilings may have gaps inside or/and near the border, but in this mission you should count number of tilings without gaps, given a zero-based row, column position of the castle.

Input: Two arguments. Both are ints.

Output: Int.

Examples:

assert kingdomino(0, 0) == 192
assert kingdomino(0, 1) == 0
assert kingdomino(0, 2) == 192
assert kingdomino(1, 1) == 112