#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using pp = pair<int, int>;
using ld = long double;

template <typename T>
istream &operator>>(istream &s, vector<T> &a)
{
    for (T &el : a)
    {
        s >> el;
    }
    return s;
}

template <typename T>
ostream &operator<<(ostream &s, vector<T> &a)
{
    for (T el : a)
    {
        s << el << ' ';
    }
    s << '\n';
    return s;
}

void solve()
{
    int n, m, g;
    cin >> n >> m >> g;
    vector<pp> edges(m);
    for (int i = 0; i < m; i++)
    {
        int a, b;
        cin >> a >> b;
        a--;
        b--;
        edges[i] = make_pair(a, b);
    }
    assert(g == 3);
    cout << (m - (n - 1)) << '\n' << 1;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    solve();
}