n,m=map(int,input().split()) e=[[0]*n for i in range(n)] for i in range(m): a,b=map(int,input().split()) a-=1 b-=1 e[a][b]=1 e[b][a]=1 c=0 for p1 in range(n): for p2 in range(n): for p3 in range(n): for p4 in range(n): f=p1!=p2 and p1!=p3 and p1!=p4 and p2!=p3 and p2!=p4 and p3!=p4 f&=e[p1][p2]==1 f&=e[p2][p3]==1 f&=e[p3][p4]==1 f&=e[p4][p1]==1 f&=e[p1][p3]==0 f&=e[p2][p4]==0 c+=f print(c//8)