//#pragma GCC optimize("O3, Ofast, unroll-loops, inline, no-stack-protector")
#include <bits/stdc++.h>
//#pragma GCC target("avx2")

using namespace std;

using ll = long long;
using pii = pair<int, int>;


int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int n, m, group;
    cin >> n >> m >> group;
    vector<vector<int>> g(n);
    for (int i = 0; i < m; ++i) {
        int u, v;
        cin >> u >> v;
        --u; --v;
        g[u].push_back(v);
    }
    cout << m - n + 1 << "\n" << 1 << "\n";
}
