문제
In order to improve their physical fitness, the cows have taken up gymnastics! Farmer John designates his favorite cow Bessie to coach the
In each of
Help Bessie compute the total number of consistent pairs.
SAMPLE INPUT:
3 4
4 1 2 3
4 1 3 2
4 2 1 3SAMPLE OUTPUT:
4The consistent pairs of cows are
Problem credits: Nick Wu
입력
The first line of the input file contains two positive integers
출력
Output, on a single line, the number of consistent pairs.