human
Anadi has a set of dominoes. Every domino has two parts, and each part contains some dots. For every a and b such that 1 ≤ a ≤ b ≤ 6, there is exactly one domino with a dots on one half and b dots on the other half. The set contains exactly 21 dominoes. Here is an exact illustration of his set:


Also, Anadi has an undirected graph without self-loops and multiple edges. He wants to choose some dominoes and place them on the edges of this graph. He can use at most one domino of each type. Each edge can fit at most one domino. It's not necessary to place a domino on each edge of the graph.

When placing a domino on an edge, he also chooses its direction. In other words, one half of any placed domino must be directed toward one of the endpoints of the edge and the other half must be directed toward the other endpoint. There's a catch: if there are multiple halves of dominoes directed toward the same vertex, each of these halves must contain the same number of dots.

How many dominoes at most can Anadi place on the edges of his graph?

Input

The first line contains two integers n and m (1 ≤ n ≤ 7, 0 ≤ m ≤ (n⋅(n-1))/(2)) — the number of vertices and the number of edges in the graph.

The next m lines contain two integers each. Integers in the i-th line are a_i and b_i (1 ≤ a, b ≤ n, a ≠ b) and denote that there is an edge which connects vertices a_i and b_i.

The graph might be disconnected. It's however guaranteed that the graph doesn't contain any self-loops, and that there is at most one edge between any pair of vertices.

Output

Output one integer which denotes the maximum number of dominoes which Anadi can place on the edges of the graph.

Examples

Input

4 4
1 2
2 3
3 4
4 1

Output

4

Input

7 0

Output

0

Input

3 1
1 3

Output

1

Input

7 21
1 2
1 3
1 4
1 5
1 6
1 7
2 3
2 4
2 5
2 6
2 7
3 4
3 5
3 6
3 7
4 5
4 6
4 7
5 6
5 7
6 7

Output

16

Note

Here is an illustration of Anadi's graph from the first sample test:


And here is one of the ways to place a domino on each of...
Solve the task in PYTHON3.
assistant
#Here is the Python program you requested.

def naiveSolve(vToDMap,edges):
    ans=0
    
    dominoFree=[[False for _ in range(7)] for __ in range(7)] # d[i][j], i<=j
    for i in range(1,7):
        for j in range(i,7):
            dominoFree[i][j]=True
    
    dCnts=0 # for checking
    for i in range(7):
        for j in range(7):
            if dominoFree[i][j]:
                dCnts+=1
    assert dCnts==21
    
    for u,v in edges:
        i,j=vToDMap[u],vToDMap[v]
        if i>j:
            temp=i
            i=j
            j=temp
        if dominoFree[i][j]:
            ans+=1
            dominoFree[i][j]=False
    
    return ans

from itertools import permutations

def main():
    
    # Every vertex must take 1 domino number
    # Try all possible permutations
    
    
            
    
    n,m=readIntArr()
    edges=[]
    for _ in range(m):
        edges.append(readIntArr())
    
    ans=0
    
    for extra in range(1,7):
        arr=list(range(1,7))+[extra]
        for p in permutations(arr):
            vertexToDominoMap=dict()
            p=list(p)
            for i in range(7):
                vertexToDominoMap[i+1]=p[i]
            ans=max(ans,naiveSolve(vertexToDominoMap,edges))
    
    print(ans)
    
    return

import sys
input=sys.stdin.buffer.readline #FOR READING PURE INTEGER INPUTS (space separation ok)
# input=lambda: sys.stdin.readline().rstrip("\r\n") #FOR READING STRING/TEXT INPUTS.
 
def oneLineArrayPrint(arr):
    print(' '.join([str(x) for x in arr]))
def multiLineArrayPrint(arr):
    print('\n'.join([str(x) for x in arr]))
def multiLineArrayOfArraysPrint(arr):
    print('\n'.join([' '.join([str(x) for x in y]) for y in arr]))
 
def readIntArr():
    return [int(x) for x in input().split()]
# def readFloatArr():
#     return [float(x) for x in input().split()]
 
def makeArr(defaultValFactory,dimensionArr): # eg. makeArr(lambda:0,[n,m])
    dv=defaultValFactory;da=dimensionArr
    if len(da)==1:return [dv() for _ in range(da[0])]
    else:return [makeArr(dv,da[1:]) for _ in range(da[0])]
 
def...