#include <bits/stdc++.h>   using namespace std;   map<pair<long long, long long>, long long> mp;   signed main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     long long n, m;     cin >> n >> m;     for (long long i = 0; i < m; i++) {       long long a, b;       cin >> a >> b;       a--;       b--;       mp[{a, b}] = 1;       mp[{b, a}] = 1;     }     if (n < 7) {       cout << m << endl;     } else {       long long ans = m;       for (long long i = 0; i < n; i++) {         for (long long j = 0; j < n; j++) {           long long ctr = 0;           for (long long k = 0; k < n; k++) {             if (mp[{i, k}] == 1 and mp[{j, k}]) {               ctr++;             }           }           ans = min(ans, ctr);         }       }       cout << m - ans << endl;     }   }   