Many important topics in abstract algebra involve a binary function acting on a set. A number of properties of such functions have been defined in the investigation of such topics.

Your challenge will be to determine whether a given binary function on a given domain possesses five of these properties.

## Properties

**[Closure](https://en.wikipedia.org/wiki/Closure_(mathematics))**

A binary function is closed if every possible output is in the domain.

**[Associativity](https://en.wikipedia.org/wiki/Associative_property)**

A binary function is associative if the order in which the function is applied to a series of inputs doesn't affect the result. That is, `$` is associative if `(a $ b) $ c` always equals `a $ (b $ c)`. Note that since the value `(a $ b)` is used as an input, associative functions must be closed.

**[Commutativity](https://en.wikipedia.org/wiki/Commutative_property)**

A binary function is commutative if swapping the order of the inputs doesn't change the result. In other words, if `a $ b` always equals `b $ a`.

**[Identity](https://en.wikipedia.org/wiki/Identity_element)**

A binary function has an identity element if there exists some element `e` in the domain such that `a $ e = a = e $ a` for all `a` in the domain.

**[Idempotence](https://en.wikipedia.org/wiki/Idempotence)**

A binary function is idempotent if applying it to two identical inputs gives that number as the output. In other words, if `a $ a = a` for all `a` in the domain.

## Input

You will be given a function in the form of a matrix, and the domain of the function will be the numbers `0 ... n-1`, where `n` is the side length of the matrix.

The value `(a $ b)` is encoded in the matrix as the `a`th row's `b`th element. If the input matrix is `Q`, then `a $ b` = `Q[a][b]`

For example, the exponentiation function (`**` in Python) on the domain `[0, 1, 2]` is encoded as:

 [[1, 0, 0]
 [1, 1, 1]
 [1, 2, 4]]

The left and right domains are the same, so the matrix will always be square.

You may use any convenient matrix format as input, such as a list of lists, a single list in row- or column- major order, your language's native matrix object, etc. However, you may not take a function directly as input.

For simplicity, the matrix entries will all be integers. You may assume that they fit in your language's native integer type.

##Output

You may indicate which of the above properties hold in any format you choose, including a list of booleans, a string with a different character for each property, etc. However, there must be a distinct, unique output for each of the 24 possible subsets of the properties. This output must be easily human-readable.

##Examples

The maximum function on domain n=4:

 [[0, 1, 2, 3]
 [1, 1, 2, 3]
 [2, 2, 2, 3]
 [3, 3, 3, 3]]

This function has the properties of closure, associativity, commutativity, identity and idempotence.

The exponentiation function on domain n=3:

 [[1, 0, 0]
 [1, 1, 1]
 [1, 2, 4]]

This function has none of the above properties.

The addition function on domain n=3:

 [[0, 1, 2]
 [1, 2, 3]
 [2, 3, 4]]

This function has the properties of commutativity and identity.

The K combinator on domain n=3:

 [[0, 0, 0]
 [1, 1, 1]
 [2, 2, 2]]

This function has the properties of closure, associativity and idempotence.

The absolute difference function on domain n=3:

 [[0, 1, 2]
 [1, 0, 1]
 [2, 1, 0]]

This function has the properties of closure, commutativity and identity.

The average function, rounding towards even, on domain n=3:

 [[0, 0, 1]
 [0, 1, 2]
 [1, 2, 2]]

This function has the properties of closure, commutativity, identity and idempotence.

The equality function on domain n=3:

 [[1, 0, 0]
 [0, 1, 0]
 [0, 0, 1]]

This function has the properties of closure and commutativity.

## Challenge

This is code golf. [Standard loopholes](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default) apply. Least bytes wins.