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.
/**
 * ******* Created by K1K on 29/9/19 4:28 AM*******
 */

import java.io.*;
import java.util.*;

public class C1230 implements Runnable {
    int[] vis = new int[8];
    int[][] count = new int[6][6];
    private void solve() throws IOException {
        int n = reader.nextInt();
        int m = reader.nextInt();
        List<Integer>[] edges = new List[n];
        for(int i=0;i<n;i++)edges[i] = new ArrayList<Integer>();
        for(int i=0;i<m;i++){
            int a = reader.nextInt()-1;
            int b = reader.nextInt()-1;
            edges[a].add(b);
            edges[b].add(a);
        }
        int max =dfs(edges,0, n);
        writer.println(max);
    }

    private int dfs(List<Integer>[] edges, int v, int n) {
        int max =0;
        if(v >= n){
            int ans = check(edges,n);
            return  Math.max(ans, max);
        }
        for(int i=1;i<=6;i++){
            vis[v] =i;
            max = Math.max(max, dfs(edges, v+1,n));
        }
        return max;
    }

    private int check(List<Integer>[] edges, int n) {
        boolean[][] used = new boolean[8][8];
        int tot=0;
        for(int i=0;i<n;i++){
            for(int v: edges[i]){
                if(vis[i]<=vis[v] && !used[vis[i]][vis[v]]) {
                    used[vis[i]][vis[v]]=true;
                    tot++;
                }
            }
        }
        return tot;
    }

    public static void main(String[] args) throws IOException {
        try (Input reader = new StandardInput(); PrintWriter writer = new PrintWriter(System.out)) {
            new C1230().run();
        }
    }

    StandardInput reader;
    PrintWriter writer;

    @Override
    public void run() {
        try {
            reader = new StandardInput();
            writer = new PrintWriter(System.out);
            solve();
            reader.close();
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    interface Input extends Closeable {
        String next() throws IOException;

        default int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        default long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        default double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        default int[] readIntArray() throws IOException {
            return readIntArray(nextInt());
        }

        default int[] readIntArray(int size) throws IOException {
            int[] array = new int[size];
            for (int i = 0; i < array.length; i++) {
                array[i] = nextInt();
            }
            return array;
        }

        default long[] readLongArray(int size) throws IOException {
            long[] array = new long[size];
            for (int i = 0; i < array.length; i++) {
                array[i] = nextLong();
            }
            return array;
        }
    }

    private static class StandardInput implements Input {
        private final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        private StringTokenizer stringTokenizer;

        @Override
        public void close() throws IOException {
            reader.close();
        }

        @Override
        public String next() throws IOException {
            if (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
                stringTokenizer = new StringTokenizer(reader.readLine());
            }
            return stringTokenizer.nextToken();
        }
    }
}
