//#pragma GCC optimize("O3")
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

vector<vector<int>> g, tg;
vector<int> used, t;
map<pair<int, int>, bool> bad;

void dfs(int v) {
    used[v] = 1;
    for (auto to : g[v]) {
        if (used[to] == 1 || bad[{v, to}]) continue;
        dfs(to);
    }
    used[v] = 2;
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n, m, q;
    cin >> n >> m >> q;
    g.resize(n); used.resize(n); tg.resize(n);
    int u, v;
//    vector<pair<int, int>> e;
    for (int i = 0; i < m; ++i) {
        cin >> u >> v;
        --v; --u;
        g[u].push_back(v);
//        e.push_back({u, v});
    }
    cout << m - n + 1 << '\n';
    cout << 1 << '\n';
}
