#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define int long long
using namespace std;
using namespace __gnu_pbds;

#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>

mt19937_64 rnd(1488);

vector<vector<int>> G, G1;
vector<bool> used;
vector<int> T, col;
vector<pair<int, int>> E;
int c;

void dfs(int v) {
    used[v] = 1;
    for (auto i : G1[v]) {
        if (!used[i]) {
            dfs(i);
        }
    }
    T.push_back(v);
}

void dfs1(int v) {
    col[v] = c;
    used[v] = 1;
    for (auto i : G[v]) {
        if (!used[i]) {
            dfs1(i);
        }
    }
}

int n, m, t;

void GM(int M) {
    G.assign(n, {});
    G1.assign(n, {});
    used.assign(n, 0);
    col.assign(n, -1);
    T.clear();
    for (int i = 0; i < m; ++i) {
        int x = E[i].first, y = E[i].second;
        if ((M >> i) & 1) {
            swap(x, y);
        }
        G[x].push_back(y);
        G1[y].push_back(x);
    }
    c = 0;
    for (int i = 0; i < n; ++i) {
        if (!used[i]) {
            dfs(i);
        }
    }
    used.assign(n, 0);
    for (int i = 0; i < n; ++i) {
        if (!used[T[n - i - 1]]) {
            dfs1(T[n - i - 1]);
            ++c;
        }
    }
    vector<int> aux(n, n);
    for (int i = 0; i < n; ++i) {
        aux[col[i]] = min(aux[col[i]], i);
    }
    for (int i = 0; i < n; ++i) {
        col[i] = aux[col[i]];
    }
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin >> n >> m >> t;
    cout << n - 1 << endl << 1;
    return 0;
    for (int i = 0; i < m; ++i) {
        int x, y;
        cin >> x >> y;
        --x;
        --y;
        E.push_back({x, y});
    }
    GM(0);
    vector<int> GS = col;
    vector<bool> all(1 << m);
    vector<pair<int, int>> chisti;
    chisti.push_back({0, 0});
    for (int i = 1; i < (1 << m); ++i) {
        GM(i);
        int cnt = 0;
        for (int j = 0; j < m; ++j) {
            if ((i >> j) & 1) {
                ++cnt;
            }
        }
        chisti.push_back({cnt, i});
        if (GS == col) {
            all[i] = 1;
        }
    }
    sort(chisti.begin(), chisti.end());
    int mx = 0, suma = 0;
    for (int i1 = 0; i1 < (1 << m); ++i1) {
        int i = chisti[i1].second;
        if (all[i]) {
            for (int j = 0; j < m; ++j) {
                if (!((i >> j) & 1)) {
                    all[i ^ (1 << j)] = 1;
                }
            }
        } else {
            if (chisti[i1].first > mx) {
                suma = 0;
            }
            mx = max(mx, chisti[i1].first);
            ++suma;
        }
    }
    cout << mx << endl << suma;
}

