#include <bits/stdc++.h>
#define endl '\n'
using namespace std;

const int MAXN = 1e6+6;
int n, m;
vector < vector <int> > G;

bool used[MAXN];

void print()
{
    cerr << "===" << endl;

    for (int i = 1; i <= n; i++)
    {
        cerr << i << ": ";
        for (int j = 0; j < G[i].size(); j++)
        {
            cerr << G[i][j] << " ";
        }
        cerr << endl;
    }

    cerr << "---" << endl;

}

int main ()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    cin >> n >> m;
    vector <pair<int,int>> v(m + 2);
    for (int i = 1; i <= m; i++)
    {
        cin >> v[i].first >> v[i].second;
    }

    vector < pair<int,int> > solution;

    for (int s = (1 << (m+1)); s >= 0; s--)
    {
        G.clear();
        G.resize(n + 1);

        for (int i = 1; i <= m; i++)
        {
            if (s & (1 << i)) G[v[i].first].push_back(i);
            else G[v[i].second].push_back(i);
        }

        vector < pair<int,int> > sol;
        int fi = 0;
        for (int i = 1; i <= n; i++)
        {
            int br = 0;
            for (int j = 0; j < G[i].size(); j++)
            {
                int cur = G[i][j];
                if (used[cur]) continue;
                br++;
                if (br % 2 == 0)
                {
                    sol.push_back({fi, cur});
                    used[cur] = 1;
                    used[fi] = 1;
                }
                else fi = cur;
            }
        }

        if (sol.size() > solution.size())
            solution = sol;
    }

    cout << solution.size() << endl;
    for (int i = 0; i < solution.size(); i++)
    {
        cout << solution[i].first << " " << solution[i].second << endl;
    }

    return 0;
}
/***
10 15
4 9
9 5
4 6
6 8
10 1
1 4
3 1
3 9
5 6
5 2
2 7
3 7
10 8
2 10
7 8

------

7
2 9
1 6
3 4
7 5
10 14
13 15
11 12




10 9
1 5
2 3
3 6
2 9
7 6
1 4
4 9
9 7
5 9


*/

