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:

<image>

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:

<image>

And here is one of the ways to place a domino on each of its edges:

<image>

Note that each vertex is faced by the halves of dominoes with the same number of dots. For instance, all halves directed toward vertex 1 have three dots.

	
	import java.io.BufferedOutputStream;
	import java.io.BufferedReader;
	import java.io.InputStreamReader;
	import java.io.PrintWriter;
	import java.util.*;

	
	public class e {
	
	public static class FastReader {
		BufferedReader br;
		StringTokenizer st;
		//it reads the data about the specified point and divide the data about it ,it is quite fast
		//than using direct 
	
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
	
		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return st.nextToken();
		}
	
		int nextInt() {
			return Integer.parseInt(next());//converts string to integer
		}
	
		double nextDouble() {
			return Double.parseDouble(next());
		}
	
		long nextLong() {
			return Long.parseLong(next());
		}
	
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	static ArrayList<String>list1=new ArrayList<String>();
	static void combine(String instr, StringBuffer outstr, int index,int k)
	{
		if(outstr.length()==k)
		{
			list1.add(outstr.toString());return;
		}
		if(outstr.toString().length()==0)
		outstr.append(instr.charAt(index));
	    for (int i = 0; i < instr.length(); i++)
	    {
	        outstr.append(instr.charAt(i));
	       
	        combine(instr, outstr, i + 1,k);
	        outstr.deleteCharAt(outstr.length() - 1);
	    }
	   index++;
	} 
	static ArrayList<ArrayList<Integer>>l=new ArrayList<>();
	static void comb(int n,int k,int ind,ArrayList<Integer>list)
	{
		if(k==0)
		{
			l.add(new ArrayList<>(list));
	
			return;
		}
		
		
		for(int i=ind;i<=n;i++)
		{
			list.add(i);
			comb(n,k-1,ind+1,list);
			
			list.remove(list.size()-1);
			
		}
		
		
		
		
		
	
	}
	
	static class Pair implements Comparable<Pair>{
	    int x;int y;
	    Pair(int x,int y){
	        this.x=x;
	        this.y=y;
	      //  this.i=i;
	    }
		@Override
		public int compareTo(Pair o) {
			// TODO Auto-generated method stub
			return (o.x*y-o.y*x);
			
		}
	}
	
		
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	  static HashMap<Long, Pair> sort(HashMap<Long, Pair> hm) 
	    { 
	        // Create a list from elements of HashMap 
	        List<Map.Entry<Long, Pair> > list = 
	               new LinkedList<Map.Entry<Long, Pair> >(hm.entrySet()); 
	  
	        // Sort the list 
	        Collections.sort(list, new Comparator<Map.Entry<Long, Pair> >() { 
	            public int compare(Map.Entry<Long, Pair> o1,  
	                               Map.Entry<Long, Pair> o2) 
	            { 
	                return (o1.getValue().y)-(o2.getValue().y); 
	            } 
	        }); 
	          
	        // put data from sorted list to hashmap  
	        HashMap<Long, Pair> temp = new LinkedHashMap<Long, Pair>(); 
	        for (Map.Entry<Long, Pair> aa : list) { 
	            temp.put(aa.getKey(), aa.getValue()); 
	        } 
	        return temp; 
	    } 
	  static long ncr(long n, int k) 
	    { long m=(long)1e9+7;
	        long C[] = new long[k + 1]; 
	         
	        // nC0 is 1 
	        C[0] = 1;   
	       
	        for (int i = 1; i <= n; i++) 
	        { 
	            // Compute next row of pascal  
	            // triangle using the previous row 
	            for (int j = Math.min(i, k); j > 0; j--) 
	                C[j] = (C[j]%m + C[j-1]%m)%m; 
	        } 
	        return C[k]%m; 
	    } 
	  static long high(long n) 
	  { 
	        
	      long p = (long)(Math.log(n) /  
	                    Math.log(2L)); 
	      return (long)Math.pow(2L, p);  
	  }
	  static int findd(int a){
	        if (parent[a]!=a){
	            parent[a] = findd(parent[a]);
	        }
	        return parent[a];
	    }
	 static int parent[];
	 static ArrayList<Integer>list=new ArrayList<Integer>();
	 static HashMap<Integer,Integer>map;
	 static boolean find(int n,int f)
	 {
		 if(map.containsKey(n))
		 {	
			 if(map.get(n)>=f)
			 {
				 map.put(n, map.get(n)-f);
				 if(map.get(n)==0)
					 map.remove(n);
				 return true;
			 }
			 else
			 {
				 f-=map.get(n);
				 map.remove(n);
				 if(find(n/2,2*f))
					 return true;
				 else
					 return false;
			 }
			
		 }
		 else if(n>1)
		 {
			if(find(n/2,2*f))
				return true;
			else
				return false;
		 }
		 else
			 return false;
	
	 }
		static int CeilIndex(int A[], int l, int r, int key) 
		{ 
			while (r - l > 1) { 
				int m = l + (r - l) / 2; 
				if (A[m] >= key) 
					r = m; 
				else
					l = m; 
			} 

			return r; 
		} 
static ArrayList<Character>li=new ArrayList<Character>();
		static int LongestIncreasingSubsequenceLength(int A[], int size) 
		{ 
			// Add boundary case, when array size is one 

			int[] tailTable = new int[size]; 
			int len; // always points empty slot 

			tailTable[0] = A[0]; 
			len = 1; 
			for (int i = 1; i < size; i++) { 
				if (A[i] < tailTable[0]) 
					// new smallest value 
					tailTable[0] = A[i]; 

				else if (A[i] > tailTable[len - 1]) 
					// A[i] wants to extend largest subsequence 
					tailTable[len++] = A[i]; 

				else
					// A[i] wants to be current end candidate of an existing 
					// subsequence. It will replace ceil value in tailTable 
					tailTable[CeilIndex(tailTable, -1, len - 1, A[i])] = A[i]; 
			} 
	      for(int i=0;i<len;i++)
	        System.out.println(tailTable[i]);
	      

			return len; 
		} 
	 static int common(ArrayList gp[],int a,int b)
	 {
		 int ans=0;
		for(int i=0;i<gp[a].size();i++)
		{
			if(gp[b].contains(gp[a].get(i)))
				ans++;
		}
		 return ans;
		 
		 
	 }
		
		
		
		
		public static void main(String[] args) {
			// TODO Auto-generated method stub
	
		FastReader in=new FastReader();
		//ArrayList<String>list=new ArrayList<String>();
		
      HashMap<Integer,Integer>map=new HashMap<Integer,Integer>();
     
     ArrayList graph[]=new ArrayList[10];
     for(int i=0;i<10;i++)
    	 graph[i]=new ArrayList<Integer>();
     
     int n=in.nextInt();
     int m=in.nextInt();
     for(int i=0;i<m;i++)
     {
    	 int a=in.nextInt();
    	 int b=in.nextInt();
    	 graph[a].add(b);
    	 graph[b].add(a);
     }
     
     if(n<=6)
     {
    	 out.println(m);
    	 out.flush();return;
     }
     int ans=0;
     for(int i=1;i<=7;i++)
     {
    	 for(int j=i+1;j<=7;j++)
    	 {
    		ans=Math.max(ans ,m-common(graph,i,j)); 
    	 }
     }
      out.println(ans);
      out.flush();
      
      
      
		}
		
	}	
		
		
		
	
