If a tree falls in the forest, and there is nobody there to hear it, does it make a sound? This classic conundrum was coined by George Berkeley (1685-1753), the bishop and influential Irish philosopher whose primary philosophical achievement is the advancement of what came to be called subjective idealism. He wrote a number of works, of which the most widely read are A Treatise Concerning the Principles of Human Knowledge (1710) and Three Dialogues between Hylas and Philonous (1713) — Philonous, the "lover of the mind," representing Berkeley himself.
A forest contains $T$ trees, numbered from $1$ to $T$, and $P$ people, numbered from $1$ to $P$.
The first line contains two integers: the number of people $P$ and the number of trees $T$ (both less than $100$). Each of the following lines contains a pair of integers $i$ and $j$, indicating that person $i$ has heard tree $j$ fall.
Different people may hold different opinions about which trees, according to Berkeley, have made a sound.
Print a single integer: the number of different opinions represented in the input. Two people hold the same opinion only if they have heard exactly the same set of trees fall.
A person who is never mentioned in any pair has heard no trees fall and expresses no opinion, so they are not counted. In particular, if the input contains no pairs, print $0$.